Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 766b3ad9769a6ed4358dde89d0f4b467d82159a9
https://github.com/WebKit/WebKit/commit/766b3ad9769a6ed4358dde89d0f4b467d82159a9
Author: Tyler Wilcock <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
A
LayoutTests/accessibility/ios-simulator/aria-errormessage-reading-order-expected.txt
A
LayoutTests/accessibility/ios-simulator/aria-errormessage-reading-order.html
M Source/WebCore/accessibility/AXCoreObject.h
M Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Log Message:
-----------
AX: On iOS, an error message made of several pieces of text is exposed
backwards, with some of its text repeated
https://bugs.webkit.org/show_bug.cgi?id=325739
rdar://188764297
Reviewed by Dominic Mazzoni.
accessibilityErrorMessageElements exposes each error message as the
accessibility elements inside it, and
VoiceOver reads those elements in order. Two things went wrong when a message
has more than one piece of
text, such as <p><span>Error:</span> Enter your full name</p>, a pattern many
design systems use.
- enumerateUnignoredDescendants() walks with a stack, but pushed each object's
children first to last, so it
visited descendants in reverse document order and the pieces of a message
came back last first.
- A piece of text that text stitching had already folded into its neighbor's
label was returned as well, so
its text was read twice.
Together these made VoiceOver read the message above as "Enter your full name,
Error: Enter your full name".
Push children onto the stack last to first, so they come off it in document
order, and leave out text
stitched into another object, as stitchedUnignoredChildren() already does. The
order also applies to the
other two callers of enumerateUnignoredDescendants(), the image overlay
elements iOS exposes for Live Text,
and the text gathered for a date or time control's value when it has no input
element.
The test turns text stitching on itself, since it is not on by default in every
configuration.
*
LayoutTests/accessibility/ios-simulator/aria-errormessage-reading-order-expected.txt:
Added.
* LayoutTests/accessibility/ios-simulator/aria-errormessage-reading-order.html:
Added.
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::Accessibility::enumerateUnignoredDescendants):
* Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(accessibleElementsForObjects):
Canonical link: https://commits.webkit.org/322318@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications