focusable icon indicating copy to clipboard operation
focusable copied to clipboard

Focus elements & suggestions

Open Mottie opened this issue 5 years ago • 0 comments

Thanks for creating this project!

From looking at the list of interactive content within the HTML standard, I have some questions about the following entries:

  • summary - I've seen that the summary is focused when a detail element is targeted, but the list of interactive content shows that the detail is interactive. This is a little confusing, especially given that there is a MDN example without a summary.
  • label - This is in the list, but focus is shifted to the associated form element. I think if it is included, it should include the for attribute, i.e. label[for]
  • object - according to that list should be replaced with object[usemap]
  • img[usemap] should also be included

Also, I think the list tabindex selectors could be simplified into [tabindex]:not([tabindex="-1"]).

And lastly, I was also wondering if the code could be made a tiny bit more readable by reformatting it into something like this:

module.exports = [
  'a[href]',
  'area[href]',
  // ...
].join(',');

Another reference: https://allyjs.io/data-tables/focusable.html

Mottie avatar Jul 26 '20 13:07 Mottie