Commit 4ffc8d34 authored by Dominic Mazzoni's avatar Dominic Mazzoni Committed by Commit Bot

Layout table roles should provide name from contents when used recursively.

Recent table refactoring means we expose more layout tables. This is
generally a good thing.

It broke some accessibility in Hangouts, where there was a layout table
inside of an ARIA button and the accessible text of the button came from
inside the layout table. Previously the layout table was just exposed as
generic elements, and layout table roles should behave the same way with
regards to how text is exposed to ancestors.

Bug: 856277
Change-Id: I9b30931b306fda09a5408df4dc3b3dd1c54e619e
Reviewed-on: https://chromium-review.googlesource.com/1117628
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571139}
parent 9ecc6042
......@@ -1509,6 +1509,11 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityLandmark) {
RunHtmlTest(FILE_PATH_LITERAL("landmark.html"));
}
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest,
AccessibilityLayoutTableInButton) {
RunHtmlTest(FILE_PATH_LITERAL("layout-table-in-button.html"));
}
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityLegend) {
RunHtmlTest(FILE_PATH_LITERAL("legend.html"));
}
......
rootWebArea
++button name='Conversation with Foo. 0 unread messages.'
++++layoutTable
++++++layoutTableRow
++++++++layoutTableCell name='Conversation with Foo. 0 unread messages.'
++++++++++genericContainer name='Conversation with Foo. 0 unread messages.'
++++++++++++staticText name='Foo'
++++++++++++++inlineTextBox name='Foo'
++++++layoutTableColumn
++++++tableHeaderContainer
<div tabindex=-1 role=button>
<div style="display: table">
<div style="display: table-row">
<div style="display: table-cell">
<div aria-label="Conversation with Foo. 0 unread messages.">
<span>Foo</span>
</div>
</div>
</div>
</div>
</div>
......@@ -3165,9 +3165,6 @@ bool AXObject::NameFromContents(bool recursive) const {
case kIframeRole:
case kImageRole:
case kInputTimeRole:
case kLayoutTableRole:
case kLayoutTableColumnRole:
case kLayoutTableRowRole:
case kListBoxRole:
case kLogRole:
case kMainRole:
......@@ -3227,6 +3224,9 @@ bool AXObject::NameFromContents(bool recursive) const {
case kImageMapRole:
case kInlineTextBoxRole:
case kLabelRole:
case kLayoutTableRole:
case kLayoutTableColumnRole:
case kLayoutTableRowRole:
case kLegendRole:
case kListRole:
case kListItemRole:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment