focusable
focusable copied to clipboard
Focus elements & suggestions
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 thesummaryis focused when adetailelement is targeted, but the list of interactive content shows that thedetailis interactive. This is a little confusing, especially given that there is a MDN example without asummary.label- This is in the list, but focus is shifted to the associated form element. I think if it is included, it should include theforattribute, i.e.label[for]object- according to that list should be replaced withobject[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