Comments (5)
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.
from tabbable.
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! :)
from tabbable.
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.
from tabbable.
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
from tabbable.
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'.
from tabbable.
Related Issues (20)
- element.matches not working in ie 11. HOT 5
- Scroll containers HOT 3
- isTabbableRadio doesn't properly escape query selectors HOT 4
- Use @testing-library/dom and Jest for tests HOT 3
- Add code coverage badge to the README HOT 5
- Restore actual browser testing with Cypress HOT 8
- support inert attribute HOT 13
- Exclude form elements in `:disabled` fieldset HOT 2
- Optimizing displayCheck: 'full' HOT 9
- Bug: isDisabledFromFieldset doesn't check the top-most disabled <fieldset> HOT 3
- Safari: Object passed in getCheckedRadio is not iterable, causing a for loop error HOT 2
- v5.3.0 breaks literally all of our usage of `tabbable` 😅 when called on a node not attached to the document HOT 40
- [MAJOR] isHidden should exclude detached nodes by default
- Firefox throws an error when checking disabled on non button element HOT 4
- IE support broken in v5.3.2+ HOT 1
- tabbable breaks when processing an element with a "scope" attribute HOT 6
- jest error Your focus-trap must have at least one container with at least one tabbable node in it at all times HOT 2
- Can't make it work testing with tabbable mocked HOT 7
- jsdom issue: 'slot):not([inert]' is not a valid selector HOT 7
- Remove nwsapi v2.2.2 override once bug is fixed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tabbable.