There were some comments on a public accessibility slack that WebKit/VoiceOver vends landmarks inconsistently between the Mac and iOS systems. In particular, role="article" is not in the landmarks list for the ARIA spec, but iOS treats it similar to one. The role description is spoken as "article, landmark" and articles appear in the landmark rotor. Neither of these is true on Mac. Of note, the Mac platform roles for landmarks all start with AXLandmark*: AXLandmarkMain, AXLandmarkNavigation, etc... but article is exposed as "AXDocumentArticle" so the bug is probably either downstream in the iOS mapping or outside of WebKit. The commenter's motivation is not clear to me the yet. I'm unsure if there is real user workflow hindered by the verbosity or rotor, or if the report is purely academic. In any case, I agree that the behavior between platforms should be consistent, unless the VO users on the QA team requested this difference for some reason.
<rdar://problem/107118745>
Commenter has clarified it's the academic reason. He considers this a bug because articles are in the landmark rotor even though they aren't technically landmarks. Tracing it back, this decision was made on purpose (around 10 years ago and perhaps with the input of VO users on the Accessibility Design and Quality team) to reduce the proliferation of additional rotors, but we're now revisiting that topic. Outcome indeterminate.
Created attachment 465715 [details] Patch
Created attachment 465716 [details] Patch
Comment on attachment 465716 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=465716&action=review > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:-670 > - AccessibilityRole::LandmarkDocRegion, What's the ARIA computedrole for LandmarkDocRegion? "region"? If so, that's included with the landmarks list https://w3c.github.io/aria/#landmark_roles
(In reply to James Craig from comment #5) > Comment on attachment 465716 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=465716&action=review > > > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:-670 > > - AccessibilityRole::LandmarkDocRegion, > > What's the ARIA computedrole for LandmarkDocRegion? "region"? If so, that's > included with the landmarks list https://w3c.github.io/aria/#landmark_roles Group role { AccessibilityRole::LandmarkDocRegion, NSAccessibilityGroupRole },
(In reply to chris fleizach from comment #6) > (In reply to James Craig from comment #5) > > Comment on attachment 465716 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=465716&action=review > > > > > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:-670 > > > - AccessibilityRole::LandmarkDocRegion, > > > > What's the ARIA computedrole for LandmarkDocRegion? "region"? If so, that's > > included with the landmarks list https://w3c.github.io/aria/#landmark_roles > > Group role > > { AccessibilityRole::LandmarkDocRegion, NSAccessibilityGroupRole }, The ARIA computed role for LandmarkDocRegion is "region" based on this sequence: AccessibilityObject::computedRoleString() special-cases accessibilityrole::LandmarkDocRegion to defer to AccessibilityRole::LandmarkRegion: https://github.com/WebKit/WebKit/blob/656c0aeae78bfa54346b7a5f5ed224574dd0b78d/Source/WebCore/accessibility/AccessibilityObject.cpp#L2573#L2574 Then we look up AccessibilityRole::LandmarkRegion in the reverse role map: https://github.com/WebKit/WebKit/blob/656c0aeae78bfa54346b7a5f5ed224574dd0b78d/Source/WebCore/accessibility/AccessibilityObject.cpp#L2475 So to James' point, it seems like we shouldn't remove AccessibilityRole::LandmarkDocRegion from `_accessibilityLandmarkAncestor`.
(In reply to Tyler Wilcock from comment #7) > (In reply to chris fleizach from comment #6) > > (In reply to James Craig from comment #5) > > > Comment on attachment 465716 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=465716&action=review > > > > > > > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:-670 > > > > - AccessibilityRole::LandmarkDocRegion, > > > > > > What's the ARIA computedrole for LandmarkDocRegion? "region"? If so, that's > > > included with the landmarks list https://w3c.github.io/aria/#landmark_roles > > > > Group role > > > > { AccessibilityRole::LandmarkDocRegion, NSAccessibilityGroupRole }, > The ARIA computed role for LandmarkDocRegion is "region" based on this > sequence: > > AccessibilityObject::computedRoleString() special-cases > accessibilityrole::LandmarkDocRegion to defer to > AccessibilityRole::LandmarkRegion: > > https://github.com/WebKit/WebKit/blob/ > 656c0aeae78bfa54346b7a5f5ed224574dd0b78d/Source/WebCore/accessibility/ > AccessibilityObject.cpp#L2573#L2574 > > Then we look up AccessibilityRole::LandmarkRegion in the reverse role map: > > https://github.com/WebKit/WebKit/blob/ > 656c0aeae78bfa54346b7a5f5ed224574dd0b78d/Source/WebCore/accessibility/ > AccessibilityObject.cpp#L2475 > > So to James' point, it seems like we shouldn't remove > AccessibilityRole::LandmarkDocRegion from `_accessibilityLandmarkAncestor`. Ok sounds good
Created attachment 465721 [details] Patch
Created attachment 465814 [details] Patch
Comment on attachment 465814 [details] Patch r+ after iOS-simulator tests pass
Committed 262763@main (ff11799319a9): <https://commits.webkit.org/262763@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 465814 [details].