Bug 163658

Summary: AX: link to container with fragment identifier that has tabindex results in container not being read and ignored by VoiceOver
Product: WebKit Reporter: Patrick H. Lauke <redux>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bfulgham, jcraig, keeganstreet, webkit-bug-importer, webkit
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: iPhone / iPad   
OS: iOS 10   
Bug Depends on:    
Bug Blocks: 159753    
Attachments:
Description Flags
Test case none

Patrick H. Lauke
Reported 2016-10-19 03:05:03 PDT
Created attachment 292058 [details] Test case Due to focus management issues in some browsers, one common approach for skip links is to link to a container with an id that also has an explicit tabindex attribute, making it focusable. <a href="#content">Skip to main content</a> ... <div id="content" tabindex="-1">...</div> However, it seems that this sort of (fairly common) skip link pattern breaks in iOS10/VoiceOver/Safari. Specifically, it seems that if the target container has a tabindex attribute, VoiceOver does move the accessibility focus to the container, but announces nothing. But more worryingly, it then seems to ignore that entire target container - swiping left/right simply jumps over that container as if it wasn't in the document at all (though if you swipe long enough to get into the Safari UI and back, it seems to usually sort itself out again). This is making fairly common skip links (for instance, those used in Bootstrap-based sites, if they follow the advice given in the BS documentation) completely unusable. See attached test case and the video at https://www.youtube.com/watch?v=JUlSav9Nm_4 (the first skip link works, but the other two skip links - to a <div id="..." tabindex="0"> and <div id="..." tabindex="-1"> - exhibit this broken behavior)
Attachments
Test case (5.52 KB, text/html)
2016-10-19 03:05 PDT, Patrick H. Lauke
no flags
Radar WebKit Bug Importer
Comment 1 2016-10-19 03:05:18 PDT
Patrick H. Lauke
Comment 2 2016-10-19 05:18:03 PDT
Possibly worth noting: the reason why authors do set explicit tabindex is, among other things, this https://bugs.webkit.org/show_bug.cgi?id=116046 (to force keyboard interaction with skip links to work correctly)
James Craig
Comment 3 2016-10-19 08:27:19 PDT
Relating bug 158430
Keegan
Comment 4 2017-06-29 17:01:31 PDT
I am finding that even if the target does not have a tabindex attribute, VoiceOver highlights the target but does not read it, and then it ignores the target container completely. Test case: https://codepen.io/keeganstreet/pen/VWyGyv
Brent Fulgham
Comment 5 2022-02-08 23:09:53 PST
This is actually being tracked under: <rdar://39953581>
Note You need to log in before you can comment on or make changes to this bug.