forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't suppress AX events on live regions which just became unignored
BrowserAccessibilityComWin::UpdateStep3FireEvents() returns early on ignored nodes as well as on nodes which used to be ignored but no longer are. Given a live region which was ignored but is now active, returning early results in no announcement being made. This change only returns early if the newly-unignored node is not inside or the root of an active live region. AX-Relnotes: Fixes bug causing some ARIA alerts to not be presented by screen readers on Windows. Bug: 1249045 Change-Id: If4b4f95d9cd2b10747ebe1155992732af09aff7b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3452066 Reviewed-by: Daniel Libby <dlibby@microsoft.com> Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com> Cr-Commit-Position: refs/heads/main@{#972360}
- Loading branch information
Showing
10 changed files
with
89 additions
and
2 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
1 change: 1 addition & 0 deletions
1
content/test/data/accessibility/event/add-alert-content-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_ANNOUNCEMENT - [Foo] |
9 changes: 9 additions & 0 deletions
9
content/test/data/accessibility/event/add-alert-content-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,9 @@ | ||
CHILDREN-CHANGED:ADD index:0 CHILD:(role=ROLE_STATIC) role=ROLE_NOTIFICATION ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
TEXT-INSERT (start=0 length=11 'First alert') role=ROLE_NOTIFICATION name='Foo' ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
=== Start Continuation === | ||
CHILDREN-CHANGED:ADD index:0 CHILD:(role=ROLE_PARAGRAPH) role=ROLE_NOTIFICATION ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
TEXT-INSERT (start=0 length=1 '%EF%BF%BC') role=ROLE_NOTIFICATION name='Bar' ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
TEXT-INSERT (start=0 length=12 'Second alert') role=ROLE_PARAGRAPH name='(null)' ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
=== Start Continuation === | ||
CHILDREN-CHANGED:ADD index:0 CHILD:(role=ROLE_STATIC) role=ROLE_PARAGRAPH ENABLED,SENSITIVE,SHOWING,VISIBLE | ||
TEXT-INSERT (start=0 length=11 'Third alert') role=ROLE_PARAGRAPH name='(null)' ENABLED,SENSITIVE,SHOWING,VISIBLE |
5 changes: 5 additions & 0 deletions
5
content/test/data/accessibility/event/add-alert-content-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 @@ | ||
AXLiveRegionChanged on AXGroup AXDescription='Foo' | ||
=== Start Continuation === | ||
AXLiveRegionChanged on AXGroup AXDescription='Bar' | ||
=== Start Continuation === | ||
AXLiveRegionChanged on AXGroup AXDescription='Baz' |
14 changes: 14 additions & 0 deletions
14
content/test/data/accessibility/event/add-alert-content-expected-uia-win.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,14 @@ | ||
LiveRegionChanged on role=alert, name=Bar | ||
LiveRegionChanged on role=alert, name=Baz | ||
LiveRegionChanged on role=alert, name=Foo | ||
LiveRegionChanged on role=alert, name=Foo | ||
=== Start Continuation === | ||
LiveRegionChanged on role=alert, name=Bar | ||
LiveRegionChanged on role=alert, name=Bar | ||
LiveRegionChanged on role=alert, name=Baz | ||
LiveRegionChanged on role=alert, name=Foo | ||
=== Start Continuation === | ||
LiveRegionChanged on role=alert, name=Bar | ||
LiveRegionChanged on role=alert, name=Baz | ||
LiveRegionChanged on role=alert, name=Baz | ||
LiveRegionChanged on role=alert, name=Foo |
5 changes: 5 additions & 0 deletions
5
content/test/data/accessibility/event/add-alert-content-expected-uia-win7.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 @@ | ||
LiveRegionChanged on role=alert, name=Foo | ||
=== Start Continuation === | ||
LiveRegionChanged on role=alert, name=Bar | ||
=== Start Continuation === | ||
LiveRegionChanged on role=alert, name=Baz |
11 changes: 11 additions & 0 deletions
11
content/test/data/accessibility/event/add-alert-content-expected-win.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,11 @@ | ||
EVENT_OBJECT_LIVEREGIONCHANGED on <div#foo> role=ROLE_SYSTEM_ALERT name="Foo" | ||
EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_STATICTEXT name="First alert" | ||
IA2_EVENT_TEXT_INSERTED on <div#foo> role=ROLE_SYSTEM_ALERT name="Foo" new_text={'First alert' start=0 end=11} | ||
=== Start Continuation === | ||
EVENT_OBJECT_LIVEREGIONCHANGED on <div#bar> role=ROLE_SYSTEM_ALERT name="Bar" | ||
EVENT_OBJECT_SHOW on <p> role=ROLE_SYSTEM_GROUPING | ||
IA2_EVENT_TEXT_INSERTED on <div#bar> role=ROLE_SYSTEM_ALERT name="Bar" new_text={'<obj>' start=0 end=1} | ||
=== Start Continuation === | ||
EVENT_OBJECT_LIVEREGIONCHANGED on <div> role=ROLE_SYSTEM_ALERT name="Baz" | ||
EVENT_OBJECT_SHOW on role=ROLE_SYSTEM_STATICTEXT name="Third alert" | ||
IA2_EVENT_TEXT_INSERTED on <p#baz> role=ROLE_SYSTEM_GROUPING new_text={'Third alert' start=0 end=11} |
28 changes: 28 additions & 0 deletions
28
content/test/data/accessibility/event/add-alert-content.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 @@ | ||
<!-- | ||
@WIN-DENY:EVENT_OBJECT_LOCATIONCHANGE* | ||
@WIN-DENY:EVENT_OBJECT_REORDER* | ||
@UIA-WIN-DENY:StructureChanged/* | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<div id="foo" aria-label="Foo" role="alert"></div> | ||
<div id="bar" aria-label="Bar" role="alert"></div> | ||
<div aria-label="Baz" role="alert"> | ||
<p id="baz"></p> | ||
</div> | ||
<script> | ||
var go_passes = [ | ||
() => document.getElementById("foo").innerHTML = "First alert", | ||
() => document.getElementById("bar").innerHTML = "<p>Second alert</p>", | ||
() => document.getElementById("baz").innerHTML = "Third alert", | ||
]; | ||
|
||
var current_pass = 0; | ||
function go() { | ||
go_passes[current_pass++].call(); | ||
return current_pass < go_passes.length; | ||
} | ||
</script> | ||
</body> | ||
</html> |