问题
I recently noticed a very weird problem with VoiceOver's web navigation on tabs and tab panels. In particular, if the wrapper wrapping the tabs and tab panels has attribute aria-label set, then VoiceOver navigation cannot navigate to tab panel when switching tabs.
The problem may be hard to describe by words, thus I created this fiddle to demonstrate. Notice that the outside wrapper div has aria-label="Wrapper"
. Below are the steps to recreate the problem:
- Run the jsFiddle to get the result area loaded.
- Navigate to one of the tab buttons either by using mouse or keyboard navigation.
- Activate VoiceOver.
- Use
VO + Right Arrow
to try to navigate to tab panel content, this should work. - Use
VO + Left Arrow
to navigate back to the second tab, pressVO + Space
to activate the tab. - Now using
VO + Right Arrow
try to navigate to the new tab panel. This will fail.
After the above steps, switching between tabs doesn not fix the problem, you cannot navigate to the panel whatsoever. But if you remove the aria-label="Wrapper"
from the wrapper div, everything works again.
Does anyone familiar with VoiceOver and WAI-ARIA know where the problem might be?
回答1:
If the two tabs contain just the strings "Tab panel 1" and "tab panel 2", then the issue appears to be fixed. Tested with OS X 10.11.1.
Yes, I know that the question is pretty old, but I'm adding my answer for future reference, just in case! :-)
来源:https://stackoverflow.com/questions/21147384/voiceover-navigation-doesnt-work-on-tab-panels-if-wrapper-has-aria-label