Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

summary element (child of detail) #36

Closed
danielweck opened this issue Feb 4, 2019 · 5 comments
Closed

summary element (child of detail) #36

danielweck opened this issue Feb 4, 2019 · 5 comments

Comments

@danielweck
Copy link

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary

summary should be added to the list:
https://github.com/davidtheclark/tabbable/blob/c5ad06c85e596fea038c8a59a97324627eaa2784/index.js#L1-L11

@davidtheclark
Copy link
Collaborator

Thanks, @danielweck. According to https://allyjs.io/data-tables/focusable.html, the summary element is not consistently tabbable across supported browsers. In 41f0000 I added it to the list of elements in that situation. You could add a tabindex to your summary elements to ensure they behave consistently, and are recognized by this library.

@danielweck
Copy link
Author

Very useful response, thank you. However, in our use-case we side-load arbitrary HTML documents, and we avoid as much as possible interfering with the authored markup. We also have the luxury of controlling what browser engine is used, so we can make reliable predictions about the level of support for specific features (like the focusability / tab-ability of detail/summary elements). So, I will probably just fork your code and continue from there. Thank you! :)

@davidtheclark
Copy link
Collaborator

Ok, @danielweck 👍

Another possibility could be to add an option to this library that allows you to add selectors to the list — so in situations like yours you could add more elements.

@danielweck
Copy link
Author

I recently revisited medialize/a11y.
Still unmaintained.
Also, relies on browser sniffing to address platform-specifc edge cases (not a bad thing per-se, just makes code hard to read + maintain):

https://github.com/medialize/ally.js/blob/master/src/is/tabbable.js

Equivalent of tabbable:

https://github.com/medialize/ally.js/blob/master/src/query/tabsequence.js

@danielweck
Copy link
Author

danielweck commented Apr 24, 2019

I noticed that focusableAreas() in the W3C working draft of 'spatial' navigation (not 'sequential' nav) is "at risk".
https://www.w3.org/TR/css-nav-1/

I wonder if the focus / tab heuristics described in the documentation of medialize/a11y match those that the W3C group have been using to design the specification. Perhaps this bit is in fact underspecified, which is why the feature is marked 'at risk'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants