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.
Consider text descendants of list items as UIAControl
IsUIAControl provides a mechanism to hide repeated content such as text items inside of containers that have their names generated from content, e.g. heading, link, button, etc. List items also have the ability to generate a name from their contents,see AXPlatformNodeWin::ComputeListItemNameAsBstr. ComputeListItemNameAsBstr only generates a name from the direct children of the list item and will not traverse down the tree. Some authors will have a div nested in a list item, both causing the list item to not generate a name, as well as not allowing this text to be in the UIA Content/Control tree at all. This change remedies the situation by allowing non-direct-children descendants of list items to be in the UIA Content/Control tree. This will not cause repeated content as List Items only consider direct children when computing their name from contents. Fixed: 1298100 Change-Id: I6d35a8d5eada4f4535e33c90c162b4b5959b8fb2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3465819 Reviewed-by: Benjamin Beaudry <benjamin.beaudry@microsoft.com> Reviewed-by: Daniel Libby <dlibby@microsoft.com> Commit-Queue: Jacques Newman <janewman@microsoft.com> Cr-Commit-Position: refs/heads/main@{#972500}
- Loading branch information
Showing
6 changed files
with
172 additions
and
6 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
55 changes: 55 additions & 0 deletions
55
content/test/data/accessibility/html/list-item-nested-div-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,55 @@ | ||
rootWebArea | ||
++genericContainer ignored | ||
++++genericContainer ignored | ||
++++++list | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++listMarker name='%E2%80%A2 ' | ||
++++++++++++staticText ignored name='%E2%80%A2 ' | ||
++++++++++genericContainer | ||
++++++++++++staticText name='tic' | ||
++++++++++++++inlineTextBox name='tic' | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++listMarker name='%E2%80%A2 ' | ||
++++++++++++staticText ignored name='%E2%80%A2 ' | ||
++++++++++button name='a button' | ||
++++++++++++staticText name='a button' | ||
++++++++++++++inlineTextBox name='a button' | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++listMarker name='%E2%80%A2 ' | ||
++++++++++++staticText ignored name='%E2%80%A2 ' | ||
++++++++++genericContainer | ||
++++++++++++staticText name='tac' | ||
++++++++++++++inlineTextBox name='tac' | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++listMarker name='%E2%80%A2 ' | ||
++++++++++++staticText ignored name='%E2%80%A2 ' | ||
++++++++++genericContainer | ||
++++++++++++staticText name='toe' | ||
++++++++++++++inlineTextBox name='toe' | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++listMarker name='%E2%80%A2 ' | ||
++++++++++++staticText ignored name='%E2%80%A2 ' | ||
++++++++++link name='a link' | ||
++++++++++++staticText name='a link' | ||
++++++++++++++inlineTextBox name='a link' | ||
++++++list | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++genericContainer | ||
++++++++++++staticText name='tic' | ||
++++++++++++++inlineTextBox name='tic' | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++button name='a button' | ||
++++++++++++staticText name='a button' | ||
++++++++++++++inlineTextBox name='a button' | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++genericContainer | ||
++++++++++++staticText name='tac' | ||
++++++++++++++inlineTextBox name='tac' | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++genericContainer | ||
++++++++++++staticText name='toe' | ||
++++++++++++++inlineTextBox name='toe' | ||
++++++++listItem hierarchicalLevel=1 | ||
++++++++++link name='a link' | ||
++++++++++++staticText name='a link' | ||
++++++++++++++inlineTextBox name='a link' |
36 changes: 36 additions & 0 deletions
36
content/test/data/accessibility/html/list-item-nested-div-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,36 @@ | ||
Document | ||
++List | ||
++++ListItem | ||
++++++Text Name='%E2%80%A2 ' IsControlElement=false | ||
++++++Group IsControlElement=false | ||
++++++++Text Name='tic' | ||
++++ListItem | ||
++++++Text Name='%E2%80%A2 ' IsControlElement=false | ||
++++++Button Name='a button' | ||
++++ListItem | ||
++++++Text Name='%E2%80%A2 ' IsControlElement=false | ||
++++++Group IsControlElement=false | ||
++++++++Text Name='tac' | ||
++++ListItem | ||
++++++Text Name='%E2%80%A2 ' IsControlElement=false | ||
++++++Group IsControlElement=false | ||
++++++++Text Name='toe' | ||
++++ListItem | ||
++++++Text Name='%E2%80%A2 ' IsControlElement=false | ||
++++++Hyperlink Name='a link' | ||
++++++++Text Name='a link' IsControlElement=false | ||
++List | ||
++++ListItem | ||
++++++Group IsControlElement=false | ||
++++++++Text Name='tic' | ||
++++ListItem | ||
++++++Button Name='a button' | ||
++++ListItem | ||
++++++Group IsControlElement=false | ||
++++++++Text Name='tac' | ||
++++ListItem | ||
++++++Group IsControlElement=false | ||
++++++++Text Name='toe' | ||
++++ListItem | ||
++++++Hyperlink Name='a link' | ||
++++++++Text Name='a link' IsControlElement=false |
36 changes: 36 additions & 0 deletions
36
content/test/data/accessibility/html/list-item-nested-div-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,36 @@ | ||
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE | ||
++ROLE_SYSTEM_LIST READONLY | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++ROLE_SYSTEM_STATICTEXT name='%E2%80%A2 ' | ||
++++++IA2_ROLE_SECTION | ||
++++++++ROLE_SYSTEM_STATICTEXT name='tic' | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++ROLE_SYSTEM_STATICTEXT name='%E2%80%A2 ' | ||
++++++ROLE_SYSTEM_PUSHBUTTON name='a button' FOCUSABLE | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++ROLE_SYSTEM_STATICTEXT name='%E2%80%A2 ' | ||
++++++IA2_ROLE_SECTION | ||
++++++++ROLE_SYSTEM_STATICTEXT name='tac' | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++ROLE_SYSTEM_STATICTEXT name='%E2%80%A2 ' | ||
++++++IA2_ROLE_SECTION | ||
++++++++ROLE_SYSTEM_STATICTEXT name='toe' | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++ROLE_SYSTEM_STATICTEXT name='%E2%80%A2 ' | ||
++++++ROLE_SYSTEM_LINK name='a link' FOCUSABLE | ||
++++++++ROLE_SYSTEM_STATICTEXT name='a link' | ||
++ROLE_SYSTEM_LIST READONLY | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++IA2_ROLE_SECTION | ||
++++++++ROLE_SYSTEM_STATICTEXT name='tic' | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++ROLE_SYSTEM_PUSHBUTTON name='a button' FOCUSABLE | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++IA2_ROLE_SECTION | ||
++++++++ROLE_SYSTEM_STATICTEXT name='tac' | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++IA2_ROLE_SECTION | ||
++++++++ROLE_SYSTEM_STATICTEXT name='toe' | ||
++++ROLE_SYSTEM_LISTITEM READONLY | ||
++++++ROLE_SYSTEM_LINK name='a link' FOCUSABLE | ||
++++++++ROLE_SYSTEM_STATICTEXT name='a link' |
27 changes: 27 additions & 0 deletions
27
content/test/data/accessibility/html/list-item-nested-div.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,27 @@ | ||
<!-- | ||
@BLINK-ALLOW:hierarchicalLevel* | ||
@MAC-ALLOW:AXSubrole | ||
--> | ||
<html> | ||
<style type="text/css"> | ||
.inlineList li { | ||
display: inline; | ||
} | ||
</style> | ||
<body> | ||
<ul> | ||
<li><div>tic</div></li> | ||
<li><button>a button</button></li> | ||
<li><div>tac</div></li> | ||
<li><div>toe</div></li> | ||
<li><a href="#">a link</a></li> | ||
</ul> | ||
<ul class="inlineList"> | ||
<li><div>tic</div></li> | ||
<li><button>a button</button></li> | ||
<li><div>tac</div></li> | ||
<li><div>toe</div></li> | ||
<li><a href="#">a link</a></li> | ||
</ul> | ||
</body> | ||
</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