I've been working on adding aria to an existing tab interface which uses url hashes (or fragments) to aid in sharing links to specific tabs. Ie, tabs.html#tab2
would show tab2 on page load.
I've been trying to follow best practices for tab accessibility as outlined by https://medium.com/@LeonieWatson/danger-testing-accessibility-with-real-people-4515f72db648
However, all of the examples that I have found for accessible tabs remove hash change functionality (the URL does not change when a tab is activated). When trying to implement it myself I ran into an odd issue. When VO is on and the VO cursor is on a tab, the VO cursor will not follow keyboard navigation to other tabs. Instead, focus will be directed immediately back to the tab with the VO cursor (preventing tabs from being read). This problem does not happen when VO is turned off (presumably because there is no VO cursor).
Notes
Examples:
What I have tried:
preventDefault()
in both the click
and hashchange
event handlersNone of which worked. No matter what I do, I can not get the VO cursor to follow keyboard navigation for tabs.
Does anyone know how to fix this?
It appears that I jumped the gun and assumed that the issue was due to VO not following programmatic focus. The REAL issue appears to be either a VO or browser bug and is actually CSS related. See my example page here: http://mfairchild365.github.io/aria-tabs-vo-bug/
I'd like to understand why a single CSS rule is having such an impact. If you can answer this, please open an issue in my example repo.