focusable-selectors icon indicating copy to clipboard operation
focusable-selectors copied to clipboard

Add support for <summary> elements

Open KittyGiraudel opened this issue 1 year ago • 1 comments

This pull-request adds two additional selectors to consider <summary> elements.

  1. This considers the first summary element directly within a details element focusable, provided it doesn’t have a negative tabindex attribute.
details > summary:first-of-type:not([tabindex^="-"])
  1. This consider the details element focusable provided it does not have a summary element and does not have a negative tabindex attribute.
details:not(:has(> summary)):not([tabindex^="-"])

Find more information about this in the HTML specifications.

KittyGiraudel avatar Jul 27 '22 10:07 KittyGiraudel

@mxmason for review. :)

KittyGiraudel avatar Jul 27 '22 10:07 KittyGiraudel