Skip to content

Commit 5bf5058

Browse files
committed
feat(table): keyboard accessibility
1 parent 6ae5268 commit 5bf5058

File tree

3 files changed

+333
-32
lines changed

3 files changed

+333
-32
lines changed

src/common/tab.service.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ export let tabbableSelector = "a[href], area[href], input:not([disabled]):not([t
33
"textarea:not([disabled]):not([tabindex=\'-1\']), " +
44
"iframe, object, embed, *[tabindex]:not([tabindex=\'-1\']), *[contenteditable=true]";
55

6-
export function getFocusElementList(element) {
7-
let elements = element.querySelectorAll(tabbableSelector);
6+
export let tabbableSelectorIgnoreTabIndex = "a[href], area[href], input:not([disabled]), " +
7+
"button:not([disabled]),select:not([disabled]), " +
8+
"textarea:not([disabled]), " +
9+
"iframe, object, embed, *[tabindex], *[contenteditable=true]";
10+
11+
export function getFocusElementList(element, selector = tabbableSelector) {
12+
let elements = element.querySelectorAll(selector);
813
return elements ? Array.prototype.filter.call(elements, el => isVisible(el)) : elements;
914
}
1015

0 commit comments

Comments
 (0)