UNPKG

@progress/kendo-angular-common

Version:
18 lines (17 loc) 900 B
/**----------------------------------------------------------------------------------------- * Copyright © 2020 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var is_focusable_1 = require("./is-focusable"); var is_visible_1 = require("./is-visible"); exports.isFocusableWithTabKey = function (element, checkVisibility) { if (checkVisibility === void 0) { checkVisibility = true; } if (!is_focusable_1.isFocusable(element)) { return false; } var tabIndex = element.getAttribute('tabIndex'); var visible = !checkVisibility || is_visible_1.isVisible(element); return visible && tabIndex !== '-1'; };