NEW285048
links skipped in VoiceOver reading order when supplying name to adjacent control via aria-labelledby
https://bugs.webkit.org/show_bug.cgi?id=285048
Summary links skipped in VoiceOver reading order when supplying name to adjacent cont...
Curtis Wilcox
Reported 2024-12-20 15:17:44 PST
Created attachment 473617 [details] Reduced case testing links and adjacent buttons named by them Using VoiceOver on iOS 18.2 with Safari, when a link is followed by a button (or other control) and the button's name comes from the link using `aria-labelledby`, the link is not included in the reading order when a "Speak screen" gesture is used or when swipe right (or left) is used to navigate element-by-element. The button is in the reading order and does have the correct name. The missing link is announced when tapped (explore-by-touch) or when the Web Rotor is set to Links. In addition to `<button>` elements, I reproduced the problem with `<summary>` and with `<a role=button href…>` elements also when the id is on a `<span>` within the link instead of on the link itself. The problem does not occur if: * the link and button names are the same but the button's name is from aria-label. * the button's aria-labelledby references more than one id. * if there is content (not just whitespace) between the link and button. * the button is before the link in the reading order. Others reproduced the problem using iOS 18.1.1 and iPadOS 18.2. The problem was not reproduced using iOS 15.8.3, iOS 17.5.1, or iPadOS 17.5.1. Reduced case attached and at this URL: https://codepen.io/ccwilcox/pen/OPLpKvZ/2d78de06d70c393062a1f992a605ce4e Workarounds tested attached and at this URL: https://codepen.io/ccwilcox/pen/dPbWOVe/5efd988fa96098431eb2b4e8432f51cd
Attachments
Reduced case testing links and adjacent buttons named by them (3.92 KB, text/html)
2024-12-20 15:17 PST, Curtis Wilcox
no flags
Reduced case testing workarounds for links and adjacent buttons named by them (4.55 KB, text/html)
2024-12-20 15:18 PST, Curtis Wilcox
no flags
Radar WebKit Bug Importer
Comment 1 2024-12-20 15:17:52 PST
Curtis Wilcox
Comment 2 2024-12-20 15:18:21 PST
Created attachment 473618 [details] Reduced case testing workarounds for links and adjacent buttons named by them
James Craig
Comment 3 2026-04-08 16:21:45 PDT
We probably need the specific area of the spec you are referring to... I assume this is one of the AccName edge cases, that might already be tested in WPT/accname, is that right?
James Craig
Comment 4 2026-04-08 16:28:59 PDT
Somewhat related to the discussion in - https://github.com/web-platform-tests/interop-accessibility/issues/165 - which was resolved recently as bug 284774
Curtis Wilcox
Comment 5 2026-05-04 09:00:31 PDT
Bug #284774 was about confusion regarding where an element with `aria-labelledby` was getting its name from. In this case, the problem is with the element that's providing the name. A button getting its name from a link's contents may be considered an edge case but the problem isn't with the button, it's being read just fine. The problem is with the link, whose name is simply from its content, because it's also providing the button with its name *and* the link is first in the DOM. I don't even know if WPT would even reveal the problem because the link is named (it will be spoken if tapped), it's only ignored when using the Speak All or Next Element gestures.
Note You need to log in before you can comment on or make changes to this bug.