focusable-selectors
focusable-selectors copied to clipboard
Add support for <summary> elements
This pull-request adds two additional selectors to consider <summary>
elements.
- This considers the first
summary
element directly within adetails
element focusable, provided it doesn’t have a negativetabindex
attribute.
details > summary:first-of-type:not([tabindex^="-"])
- This consider the
details
element focusable provided it does not have asummary
element and does not have a negativetabindex
attribute.
details:not(:has(> summary)):not([tabindex^="-"])
Find more information about this in the HTML specifications.
@mxmason for review. :)