Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0358f5736d80cf0f3a62e3651484c4cf6b96dc50
https://github.com/WebKit/WebKit/commit/0358f5736d80cf0f3a62e3651484c4cf6b96dc50
Author: Anne van Kesteren <[email protected]>
Date: 2026-10-10 (Sat, 10 Oct 2026)
Changed paths:
A
LayoutTests/accessibility/isolated-tree/mac/select-dropdown-box-value-expected.txt
A LayoutTests/accessibility/isolated-tree/mac/select-dropdown-box-value.html
A LayoutTests/accessibility/mac/select-dropdown-box-value-expected.txt
A LayoutTests/accessibility/mac/select-dropdown-box-value.html
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/html/HTMLSelectElement.cpp
M Source/WebCore/html/HTMLSelectElement.h
M Source/WebCore/html/shadow/SelectFallbackButtonElement.cpp
Log Message:
-----------
AX: the value of a dropdown box ignores an author <button> and the number of
selected options
https://bugs.webkit.org/show_bug.cgi?id=327000
rdar://189625753
Reviewed by Tyler Wilcock.
The button of a dropdown box shows the text of the author <button> if there is
one, since
322716@main, and for a multi-select the number of selected options unless
exactly one is selected.
AccessibilityRenderObject::stringValue() returns the label of the first
selected option regardless.
Move the computation of that text from
SelectFallbackButtonElement::updateText() into a new
HTMLSelectElement::buttonText(), and have stringValue() return it for a
dropdown box. With
ForAccessibility::Yes, a button that shows the selected option still gives the
aria-label or label
of that option, as before. As the text can change while the selected index does
not, the fallback
button now notifies the AXObjectCache when the text of a dropdown box changes,
which also updates
the isolated tree.
On iOS, where every native select is a dropdown box, this also fixes the value
of a
<select multiple>.
stringValue() now checks isDropdownBox() instead of usesMenuList(). This covers
a base appearance
multi-select dropdown box without HTMLEnhancedSelectMultipleDropdownBoxEnabled,
which does not use
a menu list. It also means a base appearance list box on iOS, where
usesMenuList() is always true,
no longer has a value, like list boxes elsewhere.
Tests: accessibility/isolated-tree/mac/select-dropdown-box-value.html
accessibility/mac/select-dropdown-box-value.html
Canonical link: https://commits.webkit.org/323332@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications