Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Give keyboard access to collapsible headings #189
Quick fix, doesn't fix all accessibility concerns with these toggles; eg ARIA states, odd tabbing behaviour on visually hidden links (patched but not fixed), etc.
The current heading toggles can’t be opened with a keyboard. By dynamically adding links inside the headings we get all the correct tabindex and focus behaviour.
Because content is visually hidden, the links within the content blocks can still be tabbed too. Rather than tabbing to something you can’t see, which feels broken, if the section isn’t visible, automatically open the section. (Sometimes the browser doesn't scroll to the focused link, sometimes it does.)
The current heading toggles can’t be opened with a keyboard. By making them links we get all the correct tabindex and focus behaviour for free. * Use the ID of the heading as the href target * Another JS listener listens for clicks on links in the page. This has been reduced in scope to body links (for expanding/closing footnotes) This is still not ideal. ARIA attributes should be used.
It would be great to come as close as possible to the example implemented here: http://heydonworks.com/practical_aria_examples/#progressive-collapsibles
I would also be good to reimplement the expand/collapse buttons as s with text inside them rather than Λ and V icons only.