Skip to content

Commit 009cd7d

Browse files
josepharharChromium LUCI CQ
authored andcommitted
Implement new customizable select value mapping
The new behavior was discussed and chosen here: openui/open-ui#1117 Fixed: 380313544 Change-Id: I1040340f49eb202a84f738c564dabb47a12f3bf6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6203726 Auto-Submit: Joey Arhar <[email protected]> Reviewed-by: Aaron Leventhal <[email protected]> Commit-Queue: Aaron Leventhal <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1415636}
1 parent 2171020 commit 009cd7d

35 files changed

+259
-73
lines changed

content/browser/accessibility/dump_accessibility_tree_browsertest.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,6 +2230,16 @@ IN_PROC_BROWSER_TEST_P(CustomizableSelectEnabledDumpAccessibilityTreeTest,
22302230
FILE_PATH_LITERAL("custom-select-forbidden-interactive-content.html"));
22312231
}
22322232

2233+
IN_PROC_BROWSER_TEST_P(CustomizableSelectEnabledDumpAccessibilityTreeTest,
2234+
AccessibilityCustomSelectButtonValue) {
2235+
RunHtmlTest(FILE_PATH_LITERAL("custom-select-button-value.html"));
2236+
}
2237+
2238+
IN_PROC_BROWSER_TEST_P(CustomizableSelectEnabledDumpAccessibilityTreeTest,
2239+
AccessibilityCustomSelectImgAlt) {
2240+
RunHtmlTest(FILE_PATH_LITERAL("custom-select-img-alt.html"));
2241+
}
2242+
22332243
IN_PROC_BROWSER_TEST_P(DumpAccessibilityTreeTest, AccessibilityDd) {
22342244
RunHtmlTest(FILE_PATH_LITERAL("dd.html"));
22352245
}

content/test/content_test_bundle_data.filelist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3371,6 +3371,9 @@ data/accessibility/html/custom-element-with-aria-owns-inside.html
33713371
data/accessibility/html/custom-element-with-aria-owns-outside-expected-blink.txt
33723372
data/accessibility/html/custom-element-with-aria-owns-outside.html
33733373
data/accessibility/html/custom-element.html
3374+
data/accessibility/html/custom-select-button-value-expected-auralinux.txt
3375+
data/accessibility/html/custom-select-button-value-expected-blink.txt
3376+
data/accessibility/html/custom-select-button-value.html
33743377
data/accessibility/html/custom-select-expected-android-assist-data.txt
33753378
data/accessibility/html/custom-select-expected-android-external.txt
33763379
data/accessibility/html/custom-select-expected-android.txt
@@ -3383,6 +3386,9 @@ data/accessibility/html/custom-select-expected-win.txt
33833386
data/accessibility/html/custom-select-forbidden-interactive-content-expected-auralinux.txt
33843387
data/accessibility/html/custom-select-forbidden-interactive-content-expected-blink.txt
33853388
data/accessibility/html/custom-select-forbidden-interactive-content.html
3389+
data/accessibility/html/custom-select-img-alt-expected-auralinux.txt
3390+
data/accessibility/html/custom-select-img-alt-expected-blink.txt
3391+
data/accessibility/html/custom-select-img-alt.html
33863392
data/accessibility/html/custom-select-label-element-expected-android-assist-data.txt
33873393
data/accessibility/html/custom-select-label-element-expected-android-external.txt
33883394
data/accessibility/html/custom-select-label-element-expected-android.txt

content/test/data/accessibility/aria/aria-actions-implicit-expected-blink.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ rootWebArea
22
++genericContainer ignored
33
++++genericContainer ignored
44
++++++comboBoxSelect collapsed value='hello world'
5+
++++++++genericContainer ignored invisible
6+
++++++++++button ignored invisible
7+
++++++++++++genericContainer ignored invisible
8+
++++++++++++++button ignored invisible
9+
++++++++++++++++staticText ignored invisible
510
++++++++dialog invisible ispopup=auto
611
++++++++++menuListOption name='hello world' selected=true actionsIds=button
712
++++++++++++genericContainer ignored

content/test/data/accessibility/aria/aria-actions-implicit.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-->
44
<select>
55
<button>
6-
<selectedoption></selectedoption>
6+
<selectedcontent></selectedcontent>
77
</button>
88
<option>
99
<button type="button">hello world</button>
@@ -29,7 +29,7 @@
2929
</div>
3030

3131
<style>
32-
selectedoption .description {
32+
selectedcontent .description {
3333
display: none;
3434
}
3535
select, ::picker(select) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
AXExpandedChanged on AXPopUpButton AXDescription='Fruit' AXValue='Apple'
1+
AXExpandedChanged on AXPopUpButton AXDescription='Fruit' AXValue='^'
22
AXFocusedUIElementChanged on AXMenuItem AXValue='Apple'
33
AXMenuItemSelected on AXMenuItem AXValue='Apple'

content/test/data/accessibility/event/menulist-custom-expand-collapse-expected-win.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ EVENT_OBJECT_FOCUS on <option> role=ROLE_SYSTEM_LISTITEM name="Apple" SELECTED,F
22
EVENT_OBJECT_STATECHANGE on <div> role=ROLE_SYSTEM_LIST SetSize=3
33
EVENT_OBJECT_STATECHANGE on <option> role=ROLE_SYSTEM_LISTITEM name="Banana" FOCUSABLE,SELECTABLE PosInSet=3 SetSize=3
44
EVENT_OBJECT_STATECHANGE on <option> role=ROLE_SYSTEM_LISTITEM name="Orange" FOCUSABLE,SELECTABLE PosInSet=2 SetSize=3
5-
EVENT_OBJECT_STATECHANGE on <select> role=ROLE_SYSTEM_COMBOBOX name="Fruit" value="Apple" EXPANDED,FOCUSABLE,HASPOPUP SetSize=3
5+
EVENT_OBJECT_STATECHANGE on <select> role=ROLE_SYSTEM_COMBOBOX name="Fruit" value="^" EXPANDED,FOCUSABLE,HASPOPUP SetSize=3
66
IA2_EVENT_ACTIVE_DESCENDANT_CHANGED on <div> role=ROLE_SYSTEM_LIST SetSize=3
7-
IA2_EVENT_TEXT_INSERTED on <select> role=ROLE_SYSTEM_COMBOBOX name="Fruit" value="Apple" EXPANDED,FOCUSABLE,HASPOPUP SetSize=3 new_text={'<obj>' start=0 end=1}
7+
IA2_EVENT_TEXT_INSERTED on <select> role=ROLE_SYSTEM_COMBOBOX name="Fruit" value="^" EXPANDED,FOCUSABLE,HASPOPUP SetSize=3 new_text={'<obj>' start=0 end=1}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[document web]
2+
++[section]
3+
++++[combo box]
4+
++++++[menu]
5+
++++++++[menu item] name='option' selectable selected
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
rootWebArea
2+
++genericContainer ignored
3+
++++genericContainer
4+
++++++comboBoxSelect collapsed value='button'
5+
++++++++genericContainer ignored invisible
6+
++++++++++button ignored invisible
7+
++++++++++++staticText ignored invisible
8+
++++++++++++genericContainer ignored invisible
9+
++++++++++++++staticText ignored invisible
10+
++++++++menuListPopup invisible ispopup=auto
11+
++++++++++menuListOption name='option' selected=true
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<style>
3+
select, ::picker(select) {
4+
appearance: base-select;
5+
}
6+
</style>
7+
<select>
8+
<button>button
9+
<span aria-hidden=true>aria hidden span</span>
10+
</button>
11+
<option>option</option>
12+
</select>

content/test/data/accessibility/html/custom-select-expected-android.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
android.webkit.WebView focusable focused
22
++android.view.View
3-
++++android.view.View role_description='menu pop up button' clickable collapsed focusable interesting name='USD United States Dollar $' hint='Currency for purchase'
3+
++++android.view.View role_description='menu pop up button' clickable collapsed focusable interesting name='USD' hint='Currency for purchase'
44
++++++android.view.View invisible
55
++++++++android.view.View invisible
66
++++++++++android.view.View clickable focusable invisible name='EUR Euro'

0 commit comments

Comments
 (0)