-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update aria-expanded state when popover invokers are clicked
The prior code wasn't notifying the AX system that the state was dirty when an invoker button was pressed. Now that's being done. Also add an events test to check this, and remove an extra expectation file that wasn't needed. Fixed: 1418739 Change-Id: I09cf6560dbefe65b5ffc68cc363f48c4a8131909 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4316483 Commit-Queue: Aaron Leventhal <aleventhal@chromium.org> Commit-Queue: Mason Freed <masonf@chromium.org> Auto-Submit: Mason Freed <masonf@chromium.org> Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1115980}
- Loading branch information
Mason Freed
authored and
Chromium LUCI CQ
committed
Mar 10, 2023
1 parent
f541f77
commit d64a498
Showing
24 changed files
with
243 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/event/popover-expanded-changed-expected-android.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TYPE_VIEW_CLICKED |
41 changes: 41 additions & 0 deletions
41
content/test/data/accessibility/event/popover-expanded-changed-expected-auralinux.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
CHILDREN-CHANGED:ADD index:3 CHILD:(role=ROLE_PANEL) role=ROLE_SECTION ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:EXPANDED:TRUE role=ROLE_PUSH_BUTTON name='Hide button' ENABLED,EXPANDABLE,EXPANDED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:TRUE role=ROLE_PUSH_BUTTON name='Show button' ENABLED,EXPANDABLE,EXPANDED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:TRUE role=ROLE_PUSH_BUTTON name='Toggle button' ENABLED,EXPANDABLE,EXPANDED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
=== Start Continuation === | ||
CHILDREN-CHANGED:REMOVE index:3 CHILD:(role=ROLE_PANEL) role=ROLE_SECTION ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:EXPANDED:FALSE role=ROLE_PUSH_BUTTON name='Hide button' ENABLED,EXPANDABLE,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:FALSE role=ROLE_PUSH_BUTTON name='Show button' ENABLED,EXPANDABLE,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:FALSE role=ROLE_PUSH_BUTTON name='Toggle button' ENABLED,EXPANDABLE,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
=== Start Continuation === | ||
CHILDREN-CHANGED:ADD index:3 CHILD:(role=ROLE_PANEL) role=ROLE_SECTION ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:EXPANDED:TRUE role=ROLE_PUSH_BUTTON name='Hide button' ENABLED,EXPANDABLE,EXPANDED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:TRUE role=ROLE_PUSH_BUTTON name='Show button' ENABLED,EXPANDABLE,EXPANDED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:TRUE role=ROLE_PUSH_BUTTON name='Toggle button' ENABLED,EXPANDABLE,EXPANDED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
=== Start Continuation === | ||
CHILDREN-CHANGED:REMOVE index:3 CHILD:(role=ROLE_PANEL) role=ROLE_SECTION ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:EXPANDED:FALSE role=ROLE_PUSH_BUTTON name='Hide button' ENABLED,EXPANDABLE,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:FALSE role=ROLE_PUSH_BUTTON name='Show button' ENABLED,EXPANDABLE,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:FALSE role=ROLE_PUSH_BUTTON name='Toggle button' ENABLED,EXPANDABLE,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
=== Start Continuation === | ||
CHILDREN-CHANGED:ADD index:3 CHILD:(role=ROLE_PANEL) role=ROLE_SECTION ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:EXPANDED:TRUE role=ROLE_PUSH_BUTTON name='Hide button' ENABLED,EXPANDABLE,EXPANDED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:TRUE role=ROLE_PUSH_BUTTON name='Show button' ENABLED,EXPANDABLE,EXPANDED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:TRUE role=ROLE_PUSH_BUTTON name='Toggle button' ENABLED,EXPANDABLE,EXPANDED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
=== Start Continuation === | ||
CHILDREN-CHANGED:REMOVE index:3 CHILD:(role=ROLE_PANEL) role=ROLE_SECTION ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT | ||
STATE-CHANGE:EXPANDED:FALSE role=ROLE_PUSH_BUTTON name='Hide button' ENABLED,EXPANDABLE,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:FALSE role=ROLE_PUSH_BUTTON name='Show button' ENABLED,EXPANDABLE,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE | ||
STATE-CHANGE:EXPANDED:FALSE role=ROLE_PUSH_BUTTON name='Toggle button' ENABLED,EXPANDABLE,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE |
23 changes: 23 additions & 0 deletions
23
content/test/data/accessibility/event/popover-expanded-changed-expected-mac.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
AXExpandedChanged on AXButton AXTitle='Hide button' | ||
AXExpandedChanged on AXButton AXTitle='Show button' | ||
AXExpandedChanged on AXButton AXTitle='Toggle button' | ||
=== Start Continuation === | ||
AXExpandedChanged on AXButton AXTitle='Hide button' | ||
AXExpandedChanged on AXButton AXTitle='Show button' | ||
AXExpandedChanged on AXButton AXTitle='Toggle button' | ||
=== Start Continuation === | ||
AXExpandedChanged on AXButton AXTitle='Hide button' | ||
AXExpandedChanged on AXButton AXTitle='Show button' | ||
AXExpandedChanged on AXButton AXTitle='Toggle button' | ||
=== Start Continuation === | ||
AXExpandedChanged on AXButton AXTitle='Hide button' | ||
AXExpandedChanged on AXButton AXTitle='Show button' | ||
AXExpandedChanged on AXButton AXTitle='Toggle button' | ||
=== Start Continuation === | ||
AXExpandedChanged on AXButton AXTitle='Hide button' | ||
AXExpandedChanged on AXButton AXTitle='Show button' | ||
AXExpandedChanged on AXButton AXTitle='Toggle button' | ||
=== Start Continuation === | ||
AXExpandedChanged on AXButton AXTitle='Hide button' | ||
AXExpandedChanged on AXButton AXTitle='Show button' | ||
AXExpandedChanged on AXButton AXTitle='Toggle button' |
28 changes: 28 additions & 0 deletions
28
content/test/data/accessibility/event/popover-expanded-changed.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- | ||
@UIA-WIN-DENY:* | ||
@UIA-WIN-ALLOW:ExpandCollapse* | ||
@UIA-WIN-ALLOW:AriaProperties* | ||
--> | ||
<!DOCTYPE html> | ||
|
||
<button id=toggle popovertarget=p>Toggle button</button> | ||
<button id=show popovertarget=p popovertargetaction=show>Show button</button> | ||
<button id=hide popovertarget=p popovertargetaction=hide>Hide button</button> | ||
<div popover id=p>Popover</div> | ||
|
||
<script> | ||
var go_passes = [ | ||
() => toggle.click(), | ||
() => toggle.click(), | ||
() => show.click(), | ||
() => hide.click(), | ||
() => show.click(), | ||
() => hide.click(), | ||
]; | ||
|
||
let current_pass = 0; | ||
function go() { | ||
go_passes[current_pass++].call(); | ||
return current_pass < go_passes.length; | ||
} | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
content/test/data/accessibility/html/popover-collapsed-expected-android-external.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
WebView focusable focused scrollable actions:[CLEAR_FOCUS, AX_FOCUS] bundle:[chromeRole="rootWebArea"] | ||
++View actions:[AX_FOCUS] bundle:[chromeRole="genericContainer"] | ||
++++Button text:"Will collapse" viewIdResName:"toggle" clickable focusable actions:[FOCUS, CLICK, AX_FOCUS, NEXT, PREVIOUS, COLLAPSE] bundle:[chromeRole="button", clickableScore="300", roleDescription="button"] | ||
++++View text:"Popover" viewIdResName:"will-collapse" actions:[AX_FOCUS, NEXT, PREVIOUS] bundle:[chromeRole="group"] |
8 changes: 8 additions & 0 deletions
8
content/test/data/accessibility/html/popover-collapsed-expected-blink.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
rootWebArea name='done' | ||
++genericContainer ignored | ||
++++genericContainer | ||
++++++button collapsed name='Will collapse' | ||
++++++++staticText name='Will collapse' | ||
++++++++++inlineTextBox name='Will collapse' | ||
++++++genericContainer ignored invisible | ||
++++++++staticText ignored invisible name='Popover' |
3 changes: 3 additions & 0 deletions
3
content/test/data/accessibility/html/popover-collapsed-expected-mac.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
AXWebArea AXTitle='done' | ||
++AXGroup | ||
++++AXButton AXTitle='Will collapse' |
20 changes: 20 additions & 0 deletions
20
content/test/data/accessibility/html/popover-collapsed.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- | ||
@WAIT-FOR:done | ||
--> | ||
|
||
<!DOCTYPE html> | ||
|
||
<button id=toggle popovertarget="will-collapse">Will collapse</button> | ||
<div popover id="will-collapse">Popover</div> | ||
|
||
<script> | ||
document.getElementById('toggle').click(); // Start expanded. | ||
document.addEventListener('DOMContentLoaded', () => { | ||
setTimeout(() => { | ||
document.getElementById('toggle').click(); | ||
setTimeout(() => { | ||
document.title = 'done'; | ||
}, 20); | ||
}, 250); | ||
}); | ||
</script> |
3 changes: 3 additions & 0 deletions
3
content/test/data/accessibility/html/popover-expanded-expected-android-external.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
WebView focusable focused scrollable actions:[CLEAR_FOCUS, AX_FOCUS] bundle:[chromeRole="rootWebArea"] | ||
++View actions:[AX_FOCUS] bundle:[chromeRole="genericContainer"] | ||
++++Button text:"Will expand" viewIdResName:"toggle" clickable focusable actions:[FOCUS, CLICK, AX_FOCUS, NEXT, PREVIOUS, EXPAND] bundle:[chromeRole="button", clickableScore="300", roleDescription="button"] |
9 changes: 9 additions & 0 deletions
9
content/test/data/accessibility/html/popover-expanded-expected-blink.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
rootWebArea name='done' | ||
++genericContainer ignored | ||
++++genericContainer | ||
++++++button expanded name='Will expand' | ||
++++++++staticText name='Will expand' | ||
++++++++++inlineTextBox name='Will expand' | ||
++++++group ispopup=auto | ||
++++++++staticText name='Popover' | ||
++++++++++inlineTextBox name='Popover' |
5 changes: 5 additions & 0 deletions
5
content/test/data/accessibility/html/popover-expanded-expected-mac.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
AXWebArea AXTitle='done' | ||
++AXGroup | ||
++++AXButton AXTitle='Will expand' | ||
++++AXGroup AXSubrole=AXApplicationGroup | ||
++++++AXStaticText AXValue='Popover' |
20 changes: 20 additions & 0 deletions
20
content/test/data/accessibility/html/popover-expanded.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- | ||
@BLINK-ALLOW:expanded* | ||
@WAIT-FOR:done | ||
--> | ||
|
||
<!DOCTYPE html> | ||
|
||
<button id=toggle popovertarget="will-expand">Will expand</button> | ||
<div popover id="will-expand">Popover</div> | ||
|
||
<script> | ||
document.addEventListener('DOMContentLoaded', () => { | ||
setTimeout(() => { | ||
document.getElementById('toggle').click(); | ||
setTimeout(() => { | ||
document.title = 'done'; | ||
}, 20); | ||
}, 250); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.