[webkit-changes] [WebKit/WebKit] 1c62bc: AX: Form controls take the AX text of an ancestor ...
Tyler Wilcock
noreply at github.com
Sun Mar 19 12:28:48 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1c62bc2631a32bb975dc2ebe5a20c49ffbf4b32f
https://github.com/WebKit/WebKit/commit/1c62bc2631a32bb975dc2ebe5a20c49ffbf4b32f
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-03-19 (Sun, 19 Mar 2023)
Changed paths:
A LayoutTests/accessibility/button-inside-label-ax-text-expected.txt
A LayoutTests/accessibility/button-inside-label-ax-text.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/ios/TestExpectations
A LayoutTests/platform/ios/accessibility/button-inside-label-ax-text-expected.txt
M LayoutTests/resources/accessibility-helper.js
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Log Message:
-----------
AX: Form controls take the AX text of an ancestor label over their own inner text
https://bugs.webkit.org/show_bug.cgi?id=254102
rdar://106575817
Reviewed by Chris Fleizach.
As a fallback, `AccessibilityNodeObject::labelForElement` finds and uses
the nearest label element ancestor. This is not right for labels that
have a `for` attribute, as these labels are targeted at a specific
control. This patch fixes this issue.
* LayoutTests/accessibility/button-inside-label-ax-text-expected.txt: Added.
* LayoutTests/accessibility/button-inside-label-ax-text.html: Added.
* LayoutTests/platform/glib/TestExpectations: Skip new test.
* LayoutTests/platform/ios/TestExpectations: Enable new test.
* LayoutTests/platform/ios/accessibility/button-inside-label-ax-text-expected.txt: Added.
* LayoutTests/resources/accessibility-helper.js:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::labelForElement const):
Canonical link: https://commits.webkit.org/261843@main
More information about the webkit-changes
mailing list