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

feat: add [iron-focusable] to mark as focusable #309

Merged
merged 1 commit into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ options.

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

### Limitations

Expand Down
4 changes: 3 additions & 1 deletion iron-focusables-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class IronFocusablesHelperClass {
}
// Elements that can be focused even if they have [disabled] attribute.
return matches.call(
element, 'a[href], area[href], iframe, [tabindex], [contentEditable]');
element,
'a[href], area[href], iframe, [tabindex], [contentEditable], [iron-focusable]'
);
}

/**
Expand Down
Loading