Accordion a11y issues
- When an Accordion trigger is focused, pressing down/up should focus the next/previous trigger.
- When an Accordion trigger is focused, pressing space should expand/contract its panel.
- The Accordion trigger should be a
<button> rather than a <a>.
- The Accordion trigger should be wrapped in a
h tag.
- The Accordion trigger should have an
aria-expanded attr set to true when open.
- The Accordion trigger should have an
aria-controls attr.
The same goes for the Tabs component (found in the sidebar and on code blocks), it fails a11y in many ways. I'd suggest you look at UI libs like Radix or ReachUI which provide high-quality, accessible UI components.
Accordion a11y issues
<button>rather than a<a>.htag.aria-expandedattr set totruewhen open.aria-controlsattr.The same goes for the Tabs component (found in the sidebar and on code blocks), it fails a11y in many ways. I'd suggest you look at UI libs like Radix or ReachUI which provide high-quality, accessible UI components.