Git Product home page Git Product logo

Comments (5)

davidtheclark avatar davidtheclark commented on June 27, 2024

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.

danielweck avatar danielweck commented on June 27, 2024

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.

davidtheclark avatar davidtheclark commented on June 27, 2024

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.

danielweck avatar danielweck commented on June 27, 2024

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.

danielweck avatar danielweck commented on June 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.