executablebooks / sphinx-tabs

Tabbed views for Sphinx
https://sphinx-tabs.readthedocs.io
MIT License
264 stars 68 forks source link

Add tabindex attribute to improve accessibility #66

Closed jdillard closed 3 years ago

jdillard commented 4 years ago

If the tabindex attribute of tabindex="0" was added to each a.item anchor, the javascript could be modified slightly to allow keyboard control of the tabs.

I'll look at opening a PR for this, but wanted to create the issue first.

itmightbecody commented 4 years ago

Some related material for ARIA labels and tabs, which honestly may be a separate issue in terms of implementation, but related in terms of accessibility: https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html

jdillard commented 4 years ago

Perfect example, with example code! That is probably the correct implementation, I will have to look over both resources.