Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit 97af5e9

Browse files
author
Elliott Marquez
committed
feat: add [iron-focusable] to mark as focusable
1 parent 7058de4 commit 97af5e9

File tree

4 files changed

+3294
-6
lines changed

4 files changed

+3294
-6
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ options.
3434

3535
In addition, `with-backdrop` will wrap the focus within the content in the light DOM.
3636
Override the [`_focusableNodes` getter](#Polymer.IronOverlayBehavior:property-_focusableNodes)
37-
to achieve a different behavior.
37+
to achieve a different behavior. Additionally, you can add the `iron-focusable` attribute to
38+
any element in the light DOM to mark it as focusable.
3839

3940
### Limitations
4041

iron-focusables-helper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ class IronFocusablesHelperClass {
5757
}
5858
// Elements that can be focused even if they have [disabled] attribute.
5959
return matches.call(
60-
element, 'a[href], area[href], iframe, [tabindex], [contentEditable]');
60+
element,
61+
'a[href], area[href], iframe, [tabindex], [contentEditable], [iron-focusable]'
62+
);
6163
}
6264

6365
/**

0 commit comments

Comments
 (0)