-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Interop] Orphaned listitems should be exposed as generic role
According to [1], if a listitem is not a child of ol, menu, or ul, or if the containing list element is no longer exposed with a list role, then the listitem element should be exposed with a generic role. This CL adds ParentObjectUnignoredNonGeneric() which skips intervening divs when looking for the parent of a listitem. See [2] for context. These changes make the following web platform subtests pass: el-li-orphaned in html-aam/roles-generic.html orphan div with listitem role in wai-aria/role/list-roles.html [1]https://w3c.github.io/html-aam/#el-li [2]web-platform-tests/wpt#45715 (comment) Bug: 325975937, 41490744, 337035247, 337037595 Change-Id: I9be6fa394f705c5fdbf8d0458c02f75026e3303e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5426593 Reviewed-by: Aaron Leventhal <[email protected]> Commit-Queue: Jocelyn Tran <[email protected]> Reviewed-by: Akihiro Ota <[email protected]> Cr-Commit-Position: refs/heads/main@{#1292557}
- Loading branch information
1 parent
a1ad60c
commit 1c920e6
Showing
21 changed files
with
57 additions
and
38 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,4 +70,4 @@ <h5 role="heading">Level 5</h5> | |
</div> | ||
</div> | ||
</body> | ||
</html> | ||
</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
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
10 changes: 8 additions & 2 deletions
10
content/test/data/accessibility/css/display-list-item-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 |
---|---|---|
@@ -1,8 +1,14 @@ | ||
rootWebArea | ||
++genericContainer ignored | ||
++++genericContainer ignored | ||
++++++listItem | ||
++++++genericContainer | ||
++++++++listMarker name='%E2%80%A2 ' | ||
++++++++++staticText ignored name='%E2%80%A2 ' | ||
++++++++staticText name='CSS list item' | ||
++++++++staticText name='CSS list item (without list parent)' | ||
++++++++++inlineTextBox | ||
++++++list | ||
++++++++listItem | ||
++++++++++listMarker name='%E2%80%A2 ' | ||
++++++++++++staticText ignored name='%E2%80%A2 ' | ||
++++++++++staticText name='CSS list item' | ||
++++++++++++inlineTextBox |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
<div style="display:list-item">CSS list item</div> | ||
<div style="display:list-item">CSS list item (without list parent)</div> | ||
<div role="list"><div style="display:list-item">CSS list item</div></div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ | |
} | ||
</style> | ||
</body> | ||
</html> | ||
</html> |
2 changes: 1 addition & 1 deletion
2
content/test/data/accessibility/html/reparent-crash-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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
rootWebArea | ||
++genericContainer ignored | ||
++++genericContainer ignored | ||
++++++listItem description='@NO_CHILDREN_DUMP' descriptionFrom=ariaDescription | ||
++++++genericContainer description='@NO_CHILDREN_DUMP' descriptionFrom=ariaDescription | ||
++++++genericContainer | ||
++++++++staticText name='Done' | ||
++++++++++inlineTextBox |
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: 2 additions & 2 deletions
4
...ty/blink/web_tests/platform/linux-chrome/external/wpt/html-aam/roles-generic-expected.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
This is a testharness.js-based test. | ||
[FAIL] el-li-orphaned | ||
assert_false: Computed Role: "listitem" does not match any of the acceptable role strings in ["generic", "", "none"]: <li data-testname="el-li-orphaned" class="ex-generic">x</li> expected false got true | ||
All subtests passed and are omitted for brevity. | ||
See https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/writing_web_tests.md#Text-Test-Baselines for details. | ||
Harness: the test ran to completion. |
6 changes: 2 additions & 4 deletions
6
.../blink/web_tests/platform/linux-chrome/external/wpt/wai-aria/role/list-roles-expected.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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
This is a testharness.js-based test. | ||
[FAIL] orphan p with listitem role | ||
assert_equals: <p role="listitem" data-testname="orphan p with listitem role" data-expectedrole="paragraph" class="ex">x</p> expected "paragraph" but got "listitem" | ||
[FAIL] orphan div with listitem role | ||
assert_false: Computed Role: "listitem" does not match any of the acceptable role strings in ["generic", "", "none"]: <div role="listitem" data-testname="orphan div with listitem role" class="ex-generic">x</div> expected false got true | ||
Harness: the test ran to completion. | ||
assert_equals: <p role="listitem" data-testname="orphan p with listitem role" data-expectedrole="paragraph" class="ex">x</p> expected "paragraph" but got "generic" | ||
Harness: the test ran to completion. |