diff --git a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc index 02395332922581..36199d74eb1155 100644 --- a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc +++ b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc @@ -207,7 +207,6 @@ void PopulateAXState(AXNodeInfoData* node, ui::AXNodeData* out_data) { MAP_STATE(AXBooleanProperty::FOCUSABLE, ax::mojom::State::kFocusable); MAP_STATE(AXBooleanProperty::MULTI_LINE, ax::mojom::State::kMultiline); MAP_STATE(AXBooleanProperty::PASSWORD, ax::mojom::State::kProtected); - MAP_STATE(AXBooleanProperty::SELECTED, ax::mojom::State::kSelected); #undef MAP_STATE @@ -542,6 +541,9 @@ void AXTreeSourceArc::SerializeNode(AXNodeInfoData* node, if (GetProperty(node, AXBooleanProperty::CLICKABLE)) { out_data->AddBoolAttribute(ax::mojom::BoolAttribute::kClickable, true); } + if (GetProperty(node, AXBooleanProperty::SELECTED)) { + out_data->AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + } // Range info. AXRangeInfoData* range_info = node->range_info.get(); diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs index e65dacbe4c7550..62488fcd3ae009 100644 --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs @@ -1533,9 +1533,14 @@ TEST_F('BackgroundTest', 'NavigationSyncsSelect', function() { */}, function(root) { var select = root.find({role: RoleType.POP_UP_BUTTON}); mockFeedback.call(select.doDefault.bind(select)) - .expectSpeech('apple', 'Selected') + .expectSpeech('apple', 'Menu item', ' 1 of 2 ') .call(doCmd('nextObject')) - .expectSpeech('grape', 'Selected') + .expectNextSpeechUtteranceIsNot('Selected') + .expectNextSpeechUtteranceIsNot('Unselected') + .expectSpeech('grape', 'Menu item') + .expectNextSpeechUtteranceIsNot('Selected') + .expectNextSpeechUtteranceIsNot('Unselected') + .expectSpeech(' 2 of 2 ') .replay(); }); }); diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js index f29e628d42d7c6..f1a90a8c813978 100644 --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js @@ -179,7 +179,7 @@ DesktopAutomationHandler.prototype = { * @param {!AutomationEvent} evt */ onEventIfSelected: function(evt) { - if (evt.target.state.selected) + if (evt.target.selected) this.onEventDefault(evt); }, diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js index 633dc3befb37fe..dbf6ca0808691b 100644 --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js @@ -226,7 +226,6 @@ Output.STATE_INFO_ = { expanded: {on: {msgId: 'aria_expanded_true'}}, multiselectable: {on: {msgId: 'aria_multiselectable_true'}}, required: {on: {msgId: 'aria_required_true'}}, - selected: {on: {msgId: 'aria_selected_true'}}, visited: {on: {msgId: 'visited_state'}} }; @@ -325,7 +324,8 @@ Output.RULES = { speak: `$name $cellIndexText $node(tableColumnHeader) $state $description`, braille: `$state - $name $cellIndexText $node(tableColumnHeader) $description` + $name $cellIndexText $node(tableColumnHeader) $description + $if($selected, @aria_selected_true)` }, checkBox: { speak: `$if($checked, $earcon(CHECK_ON), $earcon(CHECK_OFF)) @@ -390,7 +390,11 @@ Output.RULES = { }, listBoxOption: { speak: `$state $name $role @describe_index($posInSet, $setSize) - $description $restriction` + $description $restriction + $nif($selected, @aria_selected_false)`, + braille: `$state $name $role @describe_index($posInSet, $setSize) + $description $restriction + $if($selected, @aria_selected_true, @aria_selected_false)` }, listMarker: {speak: `$name`}, menu: { @@ -418,6 +422,10 @@ Output.RULES = { }, menuListOption: { speak: `$name $role @describe_index($posInSet, $setSize) $state + $nif($selected, @aria_selected_false) + $restriction $description`, + braille: `$name $role @describe_index($posInSet, $setSize) $state + $if($selected, @aria_selected_true, @aria_selected_false) $restriction $description` }, paragraph: {speak: `$nameOrDescendants`}, @@ -434,10 +442,14 @@ Output.RULES = { }, rootWebArea: {enter: `$name`, speak: `$if($name, $name, $docUrl)`}, region: {speak: `$state $nameOrTextContent $description $roleDescription`}, - row: {enter: `$node(tableRowHeader)`}, + row: { + enter: `$node(tableRowHeader)`, + speak: `$name $node(activeDescendant) $value $state $restriction $role + $if($selected, @aria_selected_true) $description` + }, rowHeader: { speak: `$nameOrTextContent $description $roleDescription - $state` + $state $if($selected, @aria_selected_true)` }, staticText: {speak: `$name=`}, switch: { @@ -448,7 +460,8 @@ Output.RULES = { }, tab: { speak: `@describe_tab($name) $roleDescription $description - @describe_index($posInSet, $setSize) $state $restriction `, + @describe_index($posInSet, $setSize) $state $restriction + $if($selected, @aria_selected_true)`, }, table: { enter: `@table_summary($name, @@ -490,6 +503,7 @@ Output.RULES = { @describe_depth($hierarchicalLevel)`, speak: `$name $role $description $state $restriction + $nif($selected, @aria_selected_false) @describe_index($posInSet, $setSize) @describe_depth($hierarchicalLevel)` }, @@ -633,11 +647,26 @@ Output.isTruthy = function(node, attrib) { // These attributes default to false for empty strings. case 'roleDescription': return !!node.roleDescription; + case 'selected': + return node.selected === true; default: return node[attrib] !== undefined || node.state[attrib]; } }; +/** + * represents something 'falsey', e.g.: for selected: + * node.selected === false + */ +Output.isFalsey = function(node, attrib) { + switch (attrib) { + case 'selected': + return node.selected === false; + default: + return !Output.isTruthy(node, attrib); + } +}; + Output.prototype = { /** * @return {boolean} True if there's any speech that will be output. @@ -1324,9 +1353,6 @@ Output.prototype = { resolvedInfo.msgId + '_brl' : resolvedInfo.msgId; var msg = Msgs.getMsg(msgId); - if (token == StateType.SELECTED) - options.annotation.push(new Output.SelectionSpan( - buff.length, buff.length + msg.length)); this.append_(buff, msg, options); } else if (token == 'posInSet') { if (node.posInSet !== undefined) @@ -1345,7 +1371,14 @@ Output.prototype = { var attrib = cond.value.slice(1); if (Output.isTruthy(node, attrib)) this.format_(node, cond.nextSibling, buff); - else + else if (Output.isFalsey(node, attrib)) + this.format_(node, cond.nextSibling.nextSibling, buff); + } else if (token == 'nif') { + var cond = tree.firstChild; + var attrib = cond.value.slice(1); + if (Output.isFalsey(node, attrib)) + this.format_(node, cond.nextSibling, buff); + else if (Output.isTruthy(node, attrib)) this.format_(node, cond.nextSibling.nextSibling, buff); } else if (token == 'earcon') { // Ignore unless we're generating speech output. diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs index b887ea0921a393..7bfa3fc241c3fc 100644 --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs @@ -493,17 +493,17 @@ TEST_F('OutputE2ETest', 'ListBox', function() { var el = root.firstChild.firstChild.firstChild; var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); - checkSpeechOutput('1|List item| 1 of 2 |List box|with 2 items', + checkSpeechOutput('1|List item| 1 of 2 |Not selected|List box|with 2 items', [ {value: 'name', start: 0, end: 1}, {value: new Output.EarconAction('LIST_ITEM'), start: 0,end: 1}, - {value: 'role', start: 21, end: 29} + {value: 'role', start: 34, end: 42} ], o); checkBrailleOutput( - '1 lstitm 1/2 lstbx +2', - [{value: new Output.NodeSpan(el), start: 0, end: 12}, - {value: new Output.NodeSpan(el.parent), start: 13, end: 21}], + '1 lstitm 1/2 ( ) lstbx +2', + [{value: new Output.NodeSpan(el), start: 0, end: 16}, + {value: new Output.NodeSpan(el.parent), start: 17, end: 25}], o); }); }); diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc index 2bb76a816533bd..cca531c83075c6 100644 --- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc +++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.cc @@ -69,10 +69,8 @@ class AutofillPopupChildView : public views::View { } else { // Options are selectable. node_data->role = ax::mojom::Role::kMenuItem; - if (is_selected_) { - node_data->AddState(ax::mojom::State::kSelected); - } - node_data->AddState(ax::mojom::State::kSelectable); + node_data->AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, + is_selected_); } node_data->AddIntAttribute(ax::mojom::IntAttribute::kSetSize, set_size_); diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc index 5688b012b59f87..a06796a390d02c 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc @@ -431,9 +431,8 @@ void OmniboxResultView::GetAccessibleNodeData(ui::AXNodeData* node_data) { node_data->AddIntAttribute(ax::mojom::IntAttribute::kSetSize, model_->child_count()); - node_data->AddState(ax::mojom::State::kSelectable); - if (IsSelected()) - node_data->AddState(ax::mojom::State::kSelected); + node_data->AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, + IsSelected()); if (is_hovered_) node_data->AddState(ax::mojom::State::kHovered); } diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view_unittest.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view_unittest.cc index 8dc41c418a98d6..5b8d4a4a192ab5 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_result_view_unittest.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_result_view_unittest.cc @@ -217,8 +217,10 @@ TEST_F(OmniboxResultViewTest, AccessibleNodeData) { result_view()->SetMatch(match); ui::AXNodeData result_node_data; result_view()->GetAccessibleNodeData(&result_node_data); - EXPECT_TRUE(result_node_data.HasState(ax::mojom::State::kSelectable)); - EXPECT_FALSE(result_node_data.HasState(ax::mojom::State::kSelected)); + EXPECT_TRUE( + result_node_data.HasBoolAttribute(ax::mojom::BoolAttribute::kSelected)); + EXPECT_FALSE( + result_node_data.GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)); EXPECT_EQ(result_node_data.role, ax::mojom::Role::kListBoxOption); EXPECT_EQ( result_node_data.GetString16Attribute(ax::mojom::StringAttribute::kName), @@ -230,10 +232,12 @@ TEST_F(OmniboxResultViewTest, AccessibleNodeData) { 6); // Select it and check selected state. + ui::AXNodeData result_after_click; result_view()->OnMousePressed( CreateEvent(ui::ET_MOUSE_PRESSED, ui::EF_LEFT_MOUSE_BUTTON)); - result_view()->GetAccessibleNodeData(&result_node_data); - EXPECT_TRUE(result_node_data.HasState(ax::mojom::State::kSelected)); + result_view()->GetAccessibleNodeData(&result_after_click); + EXPECT_TRUE( + result_after_click.GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)); // Check accessibility of list box. ui::AXNodeData popup_node_data; diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc index 3e0073af60f589..c2a42693024742 100644 --- a/chrome/browser/ui/views/tabs/tab.cc +++ b/chrome/browser/ui/views/tabs/tab.cc @@ -863,9 +863,8 @@ void Tab::GetAccessibleNodeData(ui::AXNodeData* node_data) { node_data->role = ax::mojom::Role::kTab; node_data->SetName(controller_->GetAccessibleTabName(this)); node_data->AddState(ax::mojom::State::kMultiselectable); - node_data->AddState(ax::mojom::State::kSelectable); - if (IsSelected()) - node_data->AddState(ax::mojom::State::kSelected); + node_data->AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, + IsSelected()); } void Tab::OnGestureEvent(ui::GestureEvent* event) { diff --git a/chrome/common/extensions/api/automation.idl b/chrome/common/extensions/api/automation.idl index 60ce020bd698ba..08f067914b345d 100644 --- a/chrome/common/extensions/api/automation.idl +++ b/chrome/common/extensions/api/automation.idl @@ -219,8 +219,6 @@ protected, required, richlyEditable, - selectable, - selected, vertical, visited }; @@ -759,6 +757,9 @@ // Indicates node text is line through. boolean lineThrough; + // Indicates whether this node is selected, unselected, or neither. + boolean? selected; + // // Walking the tree. // diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js index 893c105470a91f..fbc681049b5583 100644 --- a/chrome/renderer/resources/extensions/automation/automation_node.js +++ b/chrome/renderer/resources/extensions/automation/automation_node.js @@ -884,7 +884,8 @@ var boolAttributes = [ 'containerLiveBusy', 'liveAtomic', 'modal', - 'scrollable' + 'scrollable', + 'selected' ]; var intAttributes = [ diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc index a5e2045365090d..ff1c9bb5ecc3a2 100644 --- a/content/browser/accessibility/browser_accessibility_android.cc +++ b/content/browser/accessibility/browser_accessibility_android.cc @@ -289,7 +289,7 @@ bool BrowserAccessibilityAndroid::IsScrollable() const { } bool BrowserAccessibilityAndroid::IsSelected() const { - return HasState(ax::mojom::State::kSelected); + return GetBoolAttribute(ax::mojom::BoolAttribute::kSelected); } bool BrowserAccessibilityAndroid::IsSlider() const { diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm index 4cff922f28a3ea..3d9a418f5ed0a3 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm @@ -1837,7 +1837,7 @@ - (NSArray*)selectedChildren { for (uint32_t index = 0; index < childCount; ++index) { BrowserAccessibility* child = browserAccessibility_->PlatformGetChild(index); - if (child->HasState(ax::mojom::State::kSelected)) + if (child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)) [ret addObject:ToBrowserAccessibilityCocoa(child)]; } @@ -2112,7 +2112,8 @@ - (id)value { value = 2; break; default: - value = GetState(browserAccessibility_, ax::mojom::State::kSelected) + value = browserAccessibility_->GetBoolAttribute( + ax::mojom::BoolAttribute::kSelected) ? 1 : 0; break; diff --git a/content/browser/accessibility/web_contents_accessibility_android.cc b/content/browser/accessibility/web_contents_accessibility_android.cc index 84d2116e9fc1db..e4051516ff808c 100644 --- a/content/browser/accessibility/web_contents_accessibility_android.cc +++ b/content/browser/accessibility/web_contents_accessibility_android.cc @@ -1083,7 +1083,7 @@ void WebContentsAccessibilityAndroid::OnAutofillPopupDisplayed( ax_node_data.SetName("Autofill"); ax_node_data.SetRestriction(ax::mojom::Restriction::kReadOnly); ax_node_data.AddState(ax::mojom::State::kFocusable); - ax_node_data.AddState(ax::mojom::State::kSelectable); + ax_node_data.AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, false); g_autofill_popup_proxy_node_ax_node->SetData(ax_node_data); g_autofill_popup_proxy_node->Init(root_manager_, g_autofill_popup_proxy_node_ax_node); diff --git a/content/renderer/accessibility/aom_content_ax_tree.cc b/content/renderer/accessibility/aom_content_ax_tree.cc index 208e2a36311f27..f4a911da9e079d 100644 --- a/content/renderer/accessibility/aom_content_ax_tree.cc +++ b/content/renderer/accessibility/aom_content_ax_tree.cc @@ -24,6 +24,8 @@ ax::mojom::BoolAttribute GetCorrespondingAXAttribute( return ax::mojom::BoolAttribute::kBusy; case blink::WebAOMBoolAttribute::AOM_ATTR_MODAL: return ax::mojom::BoolAttribute::kModal; + case blink::WebAOMBoolAttribute::AOM_ATTR_SELECTED: + return ax::mojom::BoolAttribute::kSelected; default: return ax::mojom::BoolAttribute::kNone; } @@ -111,8 +113,6 @@ ax::mojom::State GetCorrespondingStateFlag(blink::WebAOMBoolAttribute attr) { return ax::mojom::State::kMultiselectable; case blink::WebAOMBoolAttribute::AOM_ATTR_REQUIRED: return ax::mojom::State::kRequired; - case blink::WebAOMBoolAttribute::AOM_ATTR_SELECTED: - return ax::mojom::State::kSelected; default: return ax::mojom::State::kNone; } diff --git a/content/renderer/accessibility/blink_ax_enum_conversion.cc b/content/renderer/accessibility/blink_ax_enum_conversion.cc index b1ddcad5186d32..86439122101e3c 100644 --- a/content/renderer/accessibility/blink_ax_enum_conversion.cc +++ b/content/renderer/accessibility/blink_ax_enum_conversion.cc @@ -44,14 +44,13 @@ void AXStateFromBlink(const blink::WebAXObject& o, ui::AXNodeData* dst) { if (o.IsRequired()) dst->AddState(ax::mojom::State::kRequired); - if (o.IsSelected() != blink::kWebAXSelectedStateUndefined) - dst->AddState(ax::mojom::State::kSelectable); - if (o.IsEditable()) dst->AddState(ax::mojom::State::kEditable); - if (o.IsSelected() == blink::kWebAXSelectedStateTrue) - dst->AddState(ax::mojom::State::kSelected); + if (o.IsSelected() != blink::kWebAXSelectedStateUndefined) { + dst->AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, + o.IsSelected() == blink::kWebAXSelectedStateTrue); + } if (o.IsRichlyEditable()) dst->AddState(ax::mojom::State::kRichlyEditable); diff --git a/content/test/data/accessibility/aria/aria-cell-expected-blink.txt b/content/test/data/accessibility/aria/aria-cell-expected-blink.txt index 276bc458dbeda9..b85fef987f2cd7 100644 --- a/content/test/data/accessibility/aria/aria-cell-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-cell-expected-blink.txt @@ -1,17 +1,17 @@ rootWebArea ++table -++++row selectable -++++++columnHeader selectable name='Browser' +++++row selected=false +++++++columnHeader name='Browser' selected=false ++++++++staticText name='Browser' ++++++++++inlineTextBox name='Browser' -++++++columnHeader selectable name='Rendering Engine' +++++++columnHeader name='Rendering Engine' selected=false ++++++++staticText name='Rendering Engine' ++++++++++inlineTextBox name='Rendering Engine' -++++row selectable -++++++cell selectable name='Chrome' +++++row selected=false +++++++cell name='Chrome' selected=false ++++++++staticText name='Chrome' ++++++++++inlineTextBox name='Chrome' -++++++cell selectable name='Blink' +++++++cell name='Blink' selected=false ++++++++staticText name='Blink' ++++++++++inlineTextBox name='Blink' ++++column diff --git a/content/test/data/accessibility/aria/aria-col-attr-expected-blink.txt b/content/test/data/accessibility/aria/aria-col-attr-expected-blink.txt index 1ab79ec04017a9..b4a5d291febd2d 100644 --- a/content/test/data/accessibility/aria/aria-col-attr-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-col-attr-expected-blink.txt @@ -1,26 +1,26 @@ rootWebArea ++grid ariaColumnCount=5 -++++row selectable -++++++columnHeader selectable name='cell 2' ariaCellColumnIndex=2 +++++row selected=false +++++++columnHeader name='cell 2' ariaCellColumnIndex=2 selected=false ++++++++staticText name='cell 2' ++++++++++inlineTextBox name='cell 2' -++++++columnHeader selectable name='cell 4' ariaCellColumnIndex=4 +++++++columnHeader name='cell 4' ariaCellColumnIndex=4 selected=false ++++++++staticText name='cell 4' ++++++++++inlineTextBox name='cell 4' -++++++columnHeader selectable name='cell 5' ariaCellColumnIndex=5 +++++++columnHeader name='cell 5' ariaCellColumnIndex=5 selected=false ++++++++staticText name='cell 5' ++++++++++inlineTextBox name='cell 5' -++++row selectable -++++++cell selectable name='cell 2' ariaCellColumnIndex=2 +++++row selected=false +++++++cell name='cell 2' ariaCellColumnIndex=2 selected=false ++++++++staticText name='cell 2' ++++++++++inlineTextBox name='cell 2' -++++++cell selectable name='cell 3' ariaCellColumnIndex=3 +++++++cell name='cell 3' ariaCellColumnIndex=3 selected=false ++++++++staticText name='cell 3' ++++++++++inlineTextBox name='cell 3' -++++++cell selectable name='cell 4' ariaCellColumnIndex=4 +++++++cell name='cell 4' ariaCellColumnIndex=4 selected=false ++++++++staticText name='cell 4' ++++++++++inlineTextBox name='cell 4' -++++++cell selectable name='cell 5' ariaCellColumnIndex=5 +++++++cell name='cell 5' ariaCellColumnIndex=5 selected=false ++++++++staticText name='cell 5' ++++++++++inlineTextBox name='cell 5' ++++column diff --git a/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt b/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt index 4bb76281ac2274..cd5b0ebea3cb96 100644 --- a/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-columnheader-expected-blink.txt @@ -1,24 +1,24 @@ rootWebArea ++grid -++++row selectable -++++++columnHeader selectable name='Browser' +++++row selected=false +++++++columnHeader name='Browser' selected=false ++++++++staticText name='Browser' ++++++++++inlineTextBox name='Browser' -++++++columnHeader selectable name='Rendering Engine' +++++++columnHeader name='Rendering Engine' selected=false ++++++++staticText name='Rendering Engine' ++++++++++inlineTextBox name='Rendering Engine' -++++row selectable -++++++cell selectable name='Chrome' +++++row selected=false +++++++cell name='Chrome' selected=false ++++++++staticText name='Chrome' ++++++++++inlineTextBox name='Chrome' -++++++cell selectable name='Blink' +++++++cell name='Blink' selected=false ++++++++staticText name='Blink' ++++++++++inlineTextBox name='Blink' -++++row selectable -++++++cell selectable name='Safari' +++++row selected=false +++++++cell name='Safari' selected=false ++++++++staticText name='Safari' ++++++++++inlineTextBox name='Safari' -++++++cell selectable name='WebKit' +++++++cell name='WebKit' selected=false ++++++++staticText name='WebKit' ++++++++++inlineTextBox name='WebKit' ++++column diff --git a/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt b/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt index a627c86b7fb318..434b97c7b79835 100644 --- a/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt @@ -4,5 +4,5 @@ rootWebArea ++++++inlineTextBox name='State' ++textFieldWithComboBox haspopup autoComplete='list' name='State' activedescendantId=listBoxOption restriction=readOnly ++listBox -++++listBoxOption selectable name='Alabama' -++++listBoxOption selectable selected name='Alaska' +++++listBoxOption name='Alabama' selected=false +++++listBoxOption name='Alaska' selected=true \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-empty-string-expected-blink.txt b/content/test/data/accessibility/aria/aria-empty-string-expected-blink.txt index 195a19d394574f..520b702cbe6d5f 100644 --- a/content/test/data/accessibility/aria/aria-empty-string-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-empty-string-expected-blink.txt @@ -2,11 +2,11 @@ rootWebArea ++genericContainer name='Atomic undefined' ++textField name='Autocomplete undefined' ++genericContainer name='Busy undefined' -++treeItem selectable name='Checked undefined' +++treeItem name='Checked undefined' selected=false ++genericContainer name='Current undefined' ++genericContainer name='Disabled undefined' ++genericContainer name='Dropeffect undefined' -++treeItem selectable name='Expanded undefined' +++treeItem name='Expanded undefined' selected=false ++genericContainer name='Grabbed undefined' ++button name='Haspopup undefined' ++genericContainer name='Invalid undefined' @@ -21,6 +21,6 @@ rootWebArea ++genericContainer name='Relevant undefined' ++textField name='Required undefined' ++tree multiselectable vertical -++++treeItem selectable name='Selected undefined' -++columnHeader selectable name='Sort undefined' -++genericContainer name='Hidden undefined, display block' +++++treeItem name='Selected undefined' selected=false +++columnHeader name='Sort undefined' selected=false +++genericContainer name='Hidden undefined, display block' \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-grid-expected-blink.txt b/content/test/data/accessibility/aria/aria-grid-expected-blink.txt index c3165b5a1e81f0..7fb717c0fe3e86 100644 --- a/content/test/data/accessibility/aria/aria-grid-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-grid-expected-blink.txt @@ -1,17 +1,17 @@ rootWebArea ++grid -++++row selectable -++++++columnHeader selectable name='Browser' +++++row selected=false +++++++columnHeader name='Browser' selected=false ++++++++staticText name='Browser' ++++++++++inlineTextBox name='Browser' -++++++columnHeader selectable name='Rendering Engine' +++++++columnHeader name='Rendering Engine' selected=false ++++++++staticText name='Rendering Engine' ++++++++++inlineTextBox name='Rendering Engine' -++++row selectable -++++++cell selectable name='Chrome' +++++row selected=false +++++++cell name='Chrome' selected=false ++++++++staticText name='Chrome' ++++++++++inlineTextBox name='Chrome' -++++++cell selectable name='Blink' +++++++cell name='Blink' selected=false ++++++++staticText name='Blink' ++++++++++inlineTextBox name='Blink' ++++column diff --git a/content/test/data/accessibility/aria/aria-grid-extra-wrap-elems-expected-blink.txt b/content/test/data/accessibility/aria/aria-grid-extra-wrap-elems-expected-blink.txt index fbeb73b30b056d..37f1e315821c2f 100644 --- a/content/test/data/accessibility/aria/aria-grid-extra-wrap-elems-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-grid-extra-wrap-elems-expected-blink.txt @@ -1,20 +1,20 @@ rootWebArea ++grid name='1: Individual rows get their own wrappers' tableRowCount=2 tableColumnCount=2 ++++genericContainer name='r1-wrap' -++++++row selectable name='r1-real' tableRowIndex=0 -++++++++cell selectable name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 +++++++row name='r1-real' tableRowIndex=0 selected=false +++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 selected=false ++++++++++staticText name='A1' ++++++++++++inlineTextBox name='A1' -++++++++cell selectable name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 +++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 selected=false ++++++++++staticText name='A2' ++++++++++++inlineTextBox name='A2' ++++genericContainer name='r2-wrap' ++++++genericContainer name='r2-vanilla' -++++++++row selectable name='r2-real' tableRowIndex=1 -++++++++++cell selectable name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 +++++++++row name='r2-real' tableRowIndex=1 selected=false +++++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 selected=false ++++++++++++staticText name='B1' ++++++++++++++inlineTextBox name='B1' -++++++++++cell selectable name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 +++++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 selected=false ++++++++++++staticText name='B2' ++++++++++++++inlineTextBox name='B2' ++++column tableColumnIndex=0 @@ -22,63 +22,63 @@ rootWebArea ++++tableHeaderContainer ++grid name='2: Single wrapper around all rows' tableRowCount=2 tableColumnCount=2 ++++genericContainer -++++++row selectable tableRowIndex=0 -++++++++cell selectable name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 +++++++row tableRowIndex=0 selected=false +++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 selected=false ++++++++++staticText name='A1' ++++++++++++inlineTextBox name='A1' -++++++++cell selectable name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 +++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 selected=false ++++++++++staticText name='A2' ++++++++++++inlineTextBox name='A2' -++++++row selectable tableRowIndex=1 -++++++++cell selectable name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 +++++++row tableRowIndex=1 selected=false +++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 selected=false ++++++++++staticText name='B1' ++++++++++++inlineTextBox name='B1' -++++++++cell selectable name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 +++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 selected=false ++++++++++staticText name='B2' ++++++++++++inlineTextBox name='B2' ++++column tableColumnIndex=0 ++++column tableColumnIndex=1 ++++tableHeaderContainer ++grid name='3: Individual cells get their own wrappers' tableRowCount=2 tableColumnCount=2 -++++row selectable tableRowIndex=0 +++++row tableRowIndex=0 selected=false ++++++genericContainer -++++++++cell selectable name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 +++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 selected=false ++++++++++staticText name='A1' ++++++++++++inlineTextBox name='A1' ++++++genericContainer -++++++++cell selectable name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 +++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 selected=false ++++++++++staticText name='A2' ++++++++++++inlineTextBox name='A2' -++++row selectable tableRowIndex=1 +++++row tableRowIndex=1 selected=false ++++++genericContainer -++++++++cell selectable name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 +++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 selected=false ++++++++++staticText name='B1' ++++++++++++inlineTextBox name='B1' ++++++genericContainer ++++++++genericContainer -++++++++++cell selectable name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 +++++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 selected=false ++++++++++++staticText name='B2' ++++++++++++++inlineTextBox name='B2' ++++column tableColumnIndex=0 ++++column tableColumnIndex=1 ++++tableHeaderContainer ++grid name='4: Single wrapper around all cells in a row' tableRowCount=2 tableColumnCount=2 -++++row selectable tableRowIndex=0 +++++row tableRowIndex=0 selected=false ++++++genericContainer -++++++++cell selectable name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 +++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 selected=false ++++++++++staticText name='A1' ++++++++++++inlineTextBox name='A1' -++++++++cell selectable name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 +++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 selected=false ++++++++++staticText name='A2' ++++++++++++inlineTextBox name='A2' -++++row selectable tableRowIndex=1 +++++row tableRowIndex=1 selected=false ++++++genericContainer ++++++++genericContainer -++++++++++cell selectable name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 +++++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 selected=false ++++++++++++staticText name='B1' ++++++++++++++inlineTextBox name='B1' ++++++++genericContainer -++++++++++cell selectable name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 +++++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 selected=false ++++++++++++staticText name='B2' ++++++++++++++inlineTextBox name='B2' ++++column tableColumnIndex=0 @@ -88,23 +88,23 @@ rootWebArea ++++genericContainer ++++++genericContainer ++++++++genericContainer -++++++++++row selectable tableRowIndex=0 +++++++++++row tableRowIndex=0 selected=false ++++++++++++genericContainer ++++++++++++++genericContainer -++++++++++++++++cell selectable name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 +++++++++++++++++cell name='A1' tableCellColumnIndex=0 tableCellRowIndex=0 selected=false ++++++++++++++++++staticText name='A1' ++++++++++++++++++++inlineTextBox name='A1' -++++++++++++cell selectable name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 +++++++++++++cell name='A2' tableCellColumnIndex=1 tableCellRowIndex=0 selected=false ++++++++++++++staticText name='A2' ++++++++++++++++inlineTextBox name='A2' ++++++genericContainer -++++++++row selectable tableRowIndex=1 -++++++++++cell selectable name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 +++++++++row tableRowIndex=1 selected=false +++++++++++cell name='B1' tableCellColumnIndex=0 tableCellRowIndex=1 selected=false ++++++++++++staticText name='B1' ++++++++++++++inlineTextBox name='B1' -++++++++++cell selectable name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 +++++++++++cell name='B2' tableCellColumnIndex=1 tableCellRowIndex=1 selected=false ++++++++++++staticText name='B2' ++++++++++++++inlineTextBox name='B2' ++++column tableColumnIndex=0 ++++column tableColumnIndex=1 -++++tableHeaderContainer +++++tableHeaderContainer \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt b/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt index 06c76cfe651d39..ccadd75e872712 100644 --- a/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-gridcell-expected-blink.txt @@ -1,17 +1,17 @@ rootWebArea ++grid multiselectable -++++row selectable -++++++columnHeader selectable name='Browser' +++++row selected=false +++++++columnHeader name='Browser' selected=false ++++++++staticText name='Browser' ++++++++++inlineTextBox name='Browser' -++++++columnHeader selectable name='Rendering Engine' +++++++columnHeader name='Rendering Engine' selected=false ++++++++staticText name='Rendering Engine' ++++++++++inlineTextBox name='Rendering Engine' -++++row selectable -++++++cell selectable name='Chrome' +++++row selected=false +++++++cell name='Chrome' selected=false ++++++++staticText name='Chrome' ++++++++++inlineTextBox name='Chrome' -++++++cell selectable name='Blink' +++++++cell name='Blink' selected=false ++++++++staticText name='Blink' ++++++++++inlineTextBox name='Blink' ++++column diff --git a/content/test/data/accessibility/aria/aria-illegal-val-expected-blink.txt b/content/test/data/accessibility/aria/aria-illegal-val-expected-blink.txt index ae34df656148ce..26bb886fbfe183 100644 --- a/content/test/data/accessibility/aria/aria-illegal-val-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-illegal-val-expected-blink.txt @@ -2,11 +2,11 @@ rootWebArea ++log containerLiveRelevant='additions text' containerLiveStatus='polite' name='Atomic illegal' liveRelevant='additions text' liveStatus='polite' containerLiveAtomic=true containerLiveBusy=false liveAtomic=true ++textField autoComplete='x-illegal' name='Autocomplete illegal' ++log containerLiveRelevant='additions text' containerLiveStatus='polite' name='Busy illegal' liveRelevant='additions text' liveStatus='polite' busy=true containerLiveAtomic=false containerLiveBusy=true liveAtomic=false -++treeItem selectable name='Checked illegal' checkedState=true +++treeItem name='Checked illegal' checkedState=true selected=false ++genericContainer name='Current illegal' ariaCurrentState=true ++genericContainer name='Disabled illegal' restriction=disabled ++genericContainer name='Dropeffect illegal' -++treeItem expanded selectable name='Expanded illegal' +++treeItem expanded name='Expanded illegal' selected=false ++genericContainer name='Grabbed illegal' ++popUpButton haspopup name='Haspopup illegal' ++genericContainer ariaInvalidValue='X-ILLEGAL' name='Invalid illegal' invalidState=other @@ -21,5 +21,5 @@ rootWebArea ++log containerLiveRelevant='X-ILLEGAL' containerLiveStatus='polite' name='Relevant illegal' liveRelevant='X-ILLEGAL' liveStatus='polite' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false ++textField required name='Required illegal' ++tree multiselectable vertical -++++treeItem selectable selected name='Selected illegal' -++columnHeader selectable name='Sort illegal' sortDirection=other \ No newline at end of file +++++treeItem name='Selected illegal' selected=true +++columnHeader name='Sort illegal' sortDirection=other selected=false \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-level-expected-blink.txt b/content/test/data/accessibility/aria/aria-level-expected-blink.txt index ac58de3aaf2222..330626ef72c72f 100644 --- a/content/test/data/accessibility/aria/aria-level-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-level-expected-blink.txt @@ -21,23 +21,23 @@ rootWebArea ++++staticText name='Level 5' ++++++inlineTextBox name='Level 5' ++tree -++++treeItem selectable name='Tree item at level 1 ' hierarchicalLevel=1 +++++treeItem name='Tree item at level 1 ' hierarchicalLevel=1 selected=false ++++++staticText name='Tree item at level 1' ++++++++inlineTextBox name='Tree item at level 1' ++++++group -++++++++treeItem selectable name='Tree item at level 2' hierarchicalLevel=2 +++++++++treeItem name='Tree item at level 2' hierarchicalLevel=2 selected=false ++++++++++staticText name='Tree item at level 2' ++++++++++++inlineTextBox name='Tree item at level 2' -++++treeItem selectable name='Tree item at level 3' hierarchicalLevel=3 +++++treeItem name='Tree item at level 3' hierarchicalLevel=3 selected=false ++++++staticText name='Tree item at level 3' ++++++++inlineTextBox name='Tree item at level 3' ++treeGrid -++++row selectable hierarchicalLevel=1 -++++++cell selectable name='Cell at level 1' +++++row hierarchicalLevel=1 selected=false +++++++cell name='Cell at level 1' selected=false ++++++++staticText name='Cell at level 1' ++++++++++inlineTextBox name='Cell at level 1' -++++row selectable hierarchicalLevel=2 -++++++cell selectable name='Cell at level 2' +++++row hierarchicalLevel=2 selected=false +++++++cell name='Cell at level 2' selected=false ++++++++staticText name='Cell at level 2' ++++++++++inlineTextBox name='Cell at level 2' ++++column diff --git a/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt index 22a40e730d69bc..e59f2d627de5a0 100644 --- a/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listbox-activedescendant-expected-blink.txt @@ -1,5 +1,5 @@ rootWebArea ++listBox activedescendantId=listBoxOption -++++listBoxOption selectable name='1' -++++listBoxOption selectable name='2' -++++listBoxOption selectable selected name='3' \ No newline at end of file +++++listBoxOption name='1' selected=false +++++listBoxOption name='2' selected=false +++++listBoxOption name='3' selected=true \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt index c156be0ffeadd0..94ec79fd2ea7bb 100644 --- a/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listbox-aria-selected-expected-blink.txt @@ -1,7 +1,7 @@ rootWebArea ++listBox -++++listBoxOption selectable name='1' -++++listBoxOption selectable name='2' -++++listBoxOption selectable name='3' -++++listBoxOption selectable selected name='4' -++++listBoxOption selectable selected name='5' \ No newline at end of file +++++listBoxOption name='1' selected=false +++++listBoxOption name='2' selected=false +++++listBoxOption name='3' selected=false +++++listBoxOption name='4' selected=true +++++listBoxOption name='5' selected=true \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt index e56ab32c7ad686..62c3abcee635e5 100644 --- a/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listbox-childfocus-expected-blink.txt @@ -1,5 +1,5 @@ rootWebArea ++listBox -++++listBoxOption selectable name='1' -++++listBoxOption selectable selected name='2' -++++listBoxOption selectable name='3' \ No newline at end of file +++++listBoxOption name='1' selected=false +++++listBoxOption name='2' selected=true +++++listBoxOption name='3' selected=false \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt b/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt index 6bab45b9f79b57..6fee00c32b3ec8 100644 --- a/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-listbox-expected-blink.txt @@ -1,7 +1,7 @@ rootWebArea ++listBox -++++listBoxOption selectable name='Item 1' setSize=2 posInSet=1 -++++listBoxOption selectable name='Item 2' setSize=2 posInSet=2 +++++listBoxOption name='Item 1' setSize=2 posInSet=1 selected=false +++++listBoxOption name='Item 2' setSize=2 posInSet=2 selected=false ++++splitter horizontal -++++listBoxOption selectable name='Second group item 1' setSize=2 posInSet=1 -++++listBoxOption selectable name='Second group item 2' setSize=2 posInSet=2 +++++listBoxOption name='Second group item 1' setSize=2 posInSet=1 selected=false +++++listBoxOption name='Second group item 2' setSize=2 posInSet=2 selected=false \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-option-expected-blink.txt b/content/test/data/accessibility/aria/aria-option-expected-blink.txt index ee82738573ede8..e4ddff75f79cec 100644 --- a/content/test/data/accessibility/aria/aria-option-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-option-expected-blink.txt @@ -1,4 +1,4 @@ rootWebArea focusable ++listBox -++++listBoxOption focusable selectable name='option 1' -++++listBoxOption focusable selectable name='label 2' +++++listBoxOption focusable name='option 1' selected=false +++++listBoxOption focusable name='label 2' selected=false \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-posinset-expected-blink.txt b/content/test/data/accessibility/aria/aria-posinset-expected-blink.txt index ae30b965e8391d..e4e88606c1e4db 100644 --- a/content/test/data/accessibility/aria/aria-posinset-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-posinset-expected-blink.txt @@ -6,11 +6,11 @@ rootWebArea ++++staticText name='This is an ARIA article 2.' ++++++inlineTextBox name='This is an ARIA article 2.' ++listBox -++++listBoxOption selectable name='Item 1' setSize=2 posInSet=1 -++++listBoxOption selectable name='Item 2' setSize=2 posInSet=2 +++++listBoxOption name='Item 1' setSize=2 posInSet=1 selected=false +++++listBoxOption name='Item 2' setSize=2 posInSet=2 selected=false ++listBox -++++listBoxOption selectable name='Item 1' setSize=2 posInSet=1 -++++listBoxOption selectable name='Item 2' setSize=2 posInSet=2 +++++listBoxOption name='Item 1' setSize=2 posInSet=1 selected=false +++++listBoxOption name='Item 2' setSize=2 posInSet=2 selected=false ++form ++++radioButton setSize=4 posInSet=3 checkedState=false ++++staticText name='1' @@ -46,4 +46,4 @@ rootWebArea ++++++++inlineTextBox name='' ++++++radioButton name='blue' setSize=1 posInSet=1 checkedState=false ++staticText name='Done' -++++inlineTextBox name='Done' +++++inlineTextBox name='Done' \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-row-attr-expected-blink.txt b/content/test/data/accessibility/aria/aria-row-attr-expected-blink.txt index d8bf0e1c035f68..eff4d71f103466 100644 --- a/content/test/data/accessibility/aria/aria-row-attr-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-row-attr-expected-blink.txt @@ -1,20 +1,20 @@ rootWebArea ++grid ariaRowCount=5 -++++row selectable -++++++columnHeader selectable name='cell 2' ariaCellRowIndex=3 +++++row selected=false +++++++columnHeader name='cell 2' ariaCellRowIndex=3 selected=false ++++++++staticText name='cell 2' ++++++++++inlineTextBox name='cell 2' -++++++columnHeader selectable name='cell 3' ariaCellRowIndex=3 +++++++columnHeader name='cell 3' ariaCellRowIndex=3 selected=false ++++++++staticText name='cell 3' ++++++++++inlineTextBox name='cell 3' -++++++columnHeader selectable name='cell 4' ariaCellRowIndex=3 +++++++columnHeader name='cell 4' ariaCellRowIndex=3 selected=false ++++++++staticText name='cell 4' ++++++++++inlineTextBox name='cell 4' -++++row selectable ariaCellRowIndex=4 -++++++cell selectable name='cell 2' ariaCellRowIndex=4 +++++row ariaCellRowIndex=4 selected=false +++++++cell name='cell 2' ariaCellRowIndex=4 selected=false ++++++++staticText name='cell 2' ++++++++++inlineTextBox name='cell 2' -++++++cell selectable name='cell 3' ariaCellRowIndex=4 +++++++cell name='cell 3' ariaCellRowIndex=4 selected=false ++++++++staticText name='cell 3' ++++++++++inlineTextBox name='cell 3' ++++column diff --git a/content/test/data/accessibility/aria/aria-row-expected-blink.txt b/content/test/data/accessibility/aria/aria-row-expected-blink.txt index 4bb76281ac2274..cd5b0ebea3cb96 100644 --- a/content/test/data/accessibility/aria/aria-row-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-row-expected-blink.txt @@ -1,24 +1,24 @@ rootWebArea ++grid -++++row selectable -++++++columnHeader selectable name='Browser' +++++row selected=false +++++++columnHeader name='Browser' selected=false ++++++++staticText name='Browser' ++++++++++inlineTextBox name='Browser' -++++++columnHeader selectable name='Rendering Engine' +++++++columnHeader name='Rendering Engine' selected=false ++++++++staticText name='Rendering Engine' ++++++++++inlineTextBox name='Rendering Engine' -++++row selectable -++++++cell selectable name='Chrome' +++++row selected=false +++++++cell name='Chrome' selected=false ++++++++staticText name='Chrome' ++++++++++inlineTextBox name='Chrome' -++++++cell selectable name='Blink' +++++++cell name='Blink' selected=false ++++++++staticText name='Blink' ++++++++++inlineTextBox name='Blink' -++++row selectable -++++++cell selectable name='Safari' +++++row selected=false +++++++cell name='Safari' selected=false ++++++++staticText name='Safari' ++++++++++inlineTextBox name='Safari' -++++++cell selectable name='WebKit' +++++++cell name='WebKit' selected=false ++++++++staticText name='WebKit' ++++++++++inlineTextBox name='WebKit' ++++column diff --git a/content/test/data/accessibility/aria/aria-rowgroup-expected-blink.txt b/content/test/data/accessibility/aria/aria-rowgroup-expected-blink.txt index cde5e91f459687..054c2766992f12 100644 --- a/content/test/data/accessibility/aria/aria-rowgroup-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-rowgroup-expected-blink.txt @@ -1,5 +1,5 @@ rootWebArea ++grid -++++row selectable -++++row selectable +++++row selected=false +++++row selected=false ++++tableHeaderContainer \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt b/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt index 523131e7a074e3..f1c62cb52ff7fa 100644 --- a/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-rowheader-expected-blink.txt @@ -1,23 +1,23 @@ rootWebArea ++grid -++++row selectable -++++++rowHeader selectable name='Browser' +++++row selected=false +++++++rowHeader name='Browser' selected=false ++++++++staticText name='Browser' ++++++++++inlineTextBox name='Browser' -++++++cell selectable name='Chrome' +++++++cell name='Chrome' selected=false ++++++++staticText name='Chrome' ++++++++++inlineTextBox name='Chrome' -++++++cell selectable name='Safari' +++++++cell name='Safari' selected=false ++++++++staticText name='Safari' ++++++++++inlineTextBox name='Safari' -++++row selectable -++++++rowHeader selectable name='Rendering Engine' +++++row selected=false +++++++rowHeader name='Rendering Engine' selected=false ++++++++staticText name='Rendering Engine' ++++++++++inlineTextBox name='Rendering Engine' -++++++cell selectable name='Blink' +++++++cell name='Blink' selected=false ++++++++staticText name='Blink' ++++++++++inlineTextBox name='Blink' -++++++cell selectable name='WebKit' +++++++cell name='WebKit' selected=false ++++++++staticText name='WebKit' ++++++++++inlineTextBox name='WebKit' ++++column diff --git a/content/test/data/accessibility/aria/aria-selected-expected-blink.txt b/content/test/data/accessibility/aria/aria-selected-expected-blink.txt index 7aa2aeaaa33ed2..a3d4b027366fb3 100644 --- a/content/test/data/accessibility/aria/aria-selected-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-selected-expected-blink.txt @@ -1,4 +1,4 @@ rootWebArea ++listBox -++++listBoxOption selectable selected name='1' -++++listBoxOption selectable name='2' \ No newline at end of file +++++listBoxOption name='1' selected=true +++++listBoxOption name='2' selected=false \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt b/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt index 6bbb422cffd922..bb8a597ae0c65f 100644 --- a/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-setsize-expected-blink.txt @@ -1,12 +1,12 @@ rootWebArea ++listBox -++++listBoxOption selectable name='Item 1' setSize=4 posInSet=1 -++++listBoxOption selectable name='Item 2' setSize=4 posInSet=2 -++++listBoxOption selectable name='Item 3' setSize=4 posInSet=3 -++++listBoxOption selectable name='Item 4' setSize=4 posInSet=4 +++++listBoxOption name='Item 1' setSize=4 posInSet=1 selected=false +++++listBoxOption name='Item 2' setSize=4 posInSet=2 selected=false +++++listBoxOption name='Item 3' setSize=4 posInSet=3 selected=false +++++listBoxOption name='Item 4' setSize=4 posInSet=4 selected=false ++listBox -++++listBoxOption selectable name='Item 1' setSize=5 posInSet=1 -++++listBoxOption selectable name='Item 2' setSize=5 posInSet=2 -++++listBoxOption selectable name='Item 3' setSize=5 posInSet=3 -++++listBoxOption selectable name='Item 4' setSize=5 posInSet=4 -++++listBoxOption selectable name='Item 5' setSize=5 posInSet=5 \ No newline at end of file +++++listBoxOption name='Item 1' setSize=5 posInSet=1 selected=false +++++listBoxOption name='Item 2' setSize=5 posInSet=2 selected=false +++++listBoxOption name='Item 3' setSize=5 posInSet=3 selected=false +++++listBoxOption name='Item 4' setSize=5 posInSet=4 selected=false +++++listBoxOption name='Item 5' setSize=5 posInSet=5 selected=false \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt b/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt index 0f1b30e13acfd8..68b32f183f940e 100644 --- a/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-sort-aria-grid-expected-blink.txt @@ -1,88 +1,88 @@ rootWebArea ++grid -++++row selectable -++++++columnHeader selectable name='Alphabet' +++++row selected=false +++++++columnHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++row selectable -++++++cell selectable name='A' +++++row selected=false +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' -++++row selectable -++++++cell selectable name='B' +++++row selected=false +++++++cell name='B' selected=false ++++++++staticText name='B' ++++++++++inlineTextBox name='B' ++++column ++++tableHeaderContainer ++grid -++++row selectable -++++++columnHeader selectable name='Alphabet' +++++row selected=false +++++++columnHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++row selectable -++++++cell selectable name='A' +++++row selected=false +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' -++++row selectable -++++++cell selectable name='B' +++++row selected=false +++++++cell name='B' selected=false ++++++++staticText name='B' ++++++++++inlineTextBox name='B' ++++column ++++tableHeaderContainer ++grid -++++row selectable -++++++columnHeader selectable name='Alphabet' +++++row selected=false +++++++columnHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++row selectable -++++++cell selectable name='A' +++++row selected=false +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' -++++row selectable -++++++cell selectable name='B' +++++row selected=false +++++++cell name='B' selected=false ++++++++staticText name='B' ++++++++++inlineTextBox name='B' ++++column ++++tableHeaderContainer ++grid -++++row selectable -++++++columnHeader selectable name='Alphabet' +++++row selected=false +++++++columnHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++row selectable -++++++cell selectable name='B' +++++row selected=false +++++++cell name='B' selected=false ++++++++staticText name='B' ++++++++++inlineTextBox name='B' -++++row selectable -++++++cell selectable name='A' +++++row selected=false +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' ++++column ++++tableHeaderContainer ++grid -++++row selectable -++++++columnHeader selectable name='Alphabet' +++++row selected=false +++++++columnHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++row selectable -++++++cell selectable name='A' +++++row selected=false +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' -++++row selectable -++++++cell selectable name='A' +++++row selected=false +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' ++++column ++++tableHeaderContainer ++grid -++++row selectable -++++++rowHeader selectable name='Alphabet' +++++row selected=false +++++++rowHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++++cell selectable name='A' +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' -++++++cell selectable name='B' +++++++cell name='B' selected=false ++++++++staticText name='B' ++++++++++inlineTextBox name='B' ++++column @@ -90,14 +90,14 @@ rootWebArea ++++column ++++tableHeaderContainer ++grid -++++row selectable -++++++rowHeader selectable name='Alphabet' +++++row selected=false +++++++rowHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++++cell selectable name='A' +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' -++++++cell selectable name='B' +++++++cell name='B' selected=false ++++++++staticText name='B' ++++++++++inlineTextBox name='B' ++++column @@ -105,14 +105,14 @@ rootWebArea ++++column ++++tableHeaderContainer ++grid -++++row selectable -++++++rowHeader selectable name='Alphabet' +++++row selected=false +++++++rowHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++++cell selectable name='A' +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' -++++++cell selectable name='B' +++++++cell name='B' selected=false ++++++++staticText name='B' ++++++++++inlineTextBox name='B' ++++column @@ -120,14 +120,14 @@ rootWebArea ++++column ++++tableHeaderContainer ++grid -++++row selectable -++++++rowHeader selectable name='Alphabet' +++++row selected=false +++++++rowHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++++cell selectable name='B' +++++++cell name='B' selected=false ++++++++staticText name='B' ++++++++++inlineTextBox name='B' -++++++cell selectable name='A' +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' ++++column @@ -135,14 +135,14 @@ rootWebArea ++++column ++++tableHeaderContainer ++grid -++++row selectable -++++++rowHeader selectable name='Alphabet' +++++row selected=false +++++++rowHeader name='Alphabet' selected=false ++++++++staticText name='Alphabet' ++++++++++inlineTextBox name='Alphabet' -++++++cell selectable name='A' +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' -++++++cell selectable name='A' +++++++cell name='A' selected=false ++++++++staticText name='A' ++++++++++inlineTextBox name='A' ++++column diff --git a/content/test/data/accessibility/aria/aria-tab-expected-blink.txt b/content/test/data/accessibility/aria/aria-tab-expected-blink.txt index 0c8c95d4197a5a..c92853cb4b92a3 100644 --- a/content/test/data/accessibility/aria/aria-tab-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tab-expected-blink.txt @@ -1,4 +1,4 @@ rootWebArea ++tabList horizontal -++++tab selectable name='Tab 1' setSize=2 posInSet=1 -++++tab selectable name='Tab 2' setSize=2 posInSet=2 \ No newline at end of file +++++tab name='Tab 1' setSize=2 posInSet=1 selected=false +++++tab name='Tab 2' setSize=2 posInSet=2 selected=false \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-table-expected-blink.txt b/content/test/data/accessibility/aria/aria-table-expected-blink.txt index c3838da4ca6c26..b85fef987f2cd7 100644 --- a/content/test/data/accessibility/aria/aria-table-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-table-expected-blink.txt @@ -1,20 +1,19 @@ rootWebArea ++table -++++row selectable -++++++columnHeader selectable name='Browser' +++++row selected=false +++++++columnHeader name='Browser' selected=false ++++++++staticText name='Browser' ++++++++++inlineTextBox name='Browser' -++++++columnHeader selectable name='Rendering Engine' +++++++columnHeader name='Rendering Engine' selected=false ++++++++staticText name='Rendering Engine' ++++++++++inlineTextBox name='Rendering Engine' -++++row selectable -++++++cell selectable name='Chrome' +++++row selected=false +++++++cell name='Chrome' selected=false ++++++++staticText name='Chrome' ++++++++++inlineTextBox name='Chrome' -++++++cell selectable name='Blink' +++++++cell name='Blink' selected=false ++++++++staticText name='Blink' ++++++++++inlineTextBox name='Blink' ++++column ++++column -++++tableHeaderContainer -<-- End-of-file --> \ No newline at end of file +++++tableHeaderContainer \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt b/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt index 9dfeb72898a3ce..26c49885178616 100644 --- a/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tablist-expected-blink.txt @@ -1,4 +1,4 @@ rootWebArea ++tabList horizontal -++++tab selectable name='Tab 1' -++++tab selectable name='Tab 2' \ No newline at end of file +++++tab name='Tab 1' selected=false +++++tab name='Tab 2' selected=false \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt b/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt index 3d2a219723a88f..e4702b3bffd3a6 100644 --- a/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tabpanel-expected-blink.txt @@ -1,10 +1,10 @@ rootWebArea ++tabPanel -++++tab selectable name='Item' +++++tab name='Item' selected=false ++++++heading name='Item' hierarchicalLevel=3 ++++++++staticText name='Item' ++++++++++inlineTextBox name='Item' -++++tab selectable name='Prices' +++++tab name='Prices' selected=false ++++++heading name='Prices' hierarchicalLevel=3 ++++++++staticText name='Prices' ++++++++++inlineTextBox name='Prices' \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-tree-expected-blink.txt b/content/test/data/accessibility/aria/aria-tree-expected-blink.txt index ff467f9c2d9764..7384fc212a763e 100644 --- a/content/test/data/accessibility/aria/aria-tree-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-tree-expected-blink.txt @@ -1,28 +1,28 @@ rootWebArea ++tree -++++treeItem selectable name='Animals ' hierarchicalLevel=1 setSize=2 posInSet=1 checkedState=mixed +++++treeItem name='Animals ' hierarchicalLevel=1 setSize=2 posInSet=1 checkedState=mixed selected=false ++++++link name='Animals' ++++++++staticText name='Animals' ++++++++++inlineTextBox name='Animals' ++++++group -++++++++treeItem selectable name='Domesticated ' hierarchicalLevel=2 setSize=2 posInSet=1 +++++++++treeItem name='Domesticated ' hierarchicalLevel=2 setSize=2 posInSet=1 selected=false ++++++++++link name='Domesticated' ++++++++++++staticText name='Domesticated' ++++++++++++++inlineTextBox name='Domesticated' ++++++++++group -++++++++++++treeItem selectable name='Dog' hierarchicalLevel=3 setSize=2 posInSet=1 checkedState=true +++++++++++++treeItem name='Dog' hierarchicalLevel=3 setSize=2 posInSet=1 checkedState=true selected=false ++++++++++++++link name='Dog' ++++++++++++++++staticText name='Dog' ++++++++++++++++++inlineTextBox name='Dog' -++++++++++++treeItem selectable name='Cat' hierarchicalLevel=3 setSize=2 posInSet=2 checkedState=false +++++++++++++treeItem name='Cat' hierarchicalLevel=3 setSize=2 posInSet=2 checkedState=false selected=false ++++++++++++++link name='Cat' ++++++++++++++++staticText name='Cat' ++++++++++++++++++inlineTextBox name='Cat' -++++++++treeItem selectable name='Wild' hierarchicalLevel=2 setSize=2 posInSet=2 +++++++++treeItem name='Wild' hierarchicalLevel=2 setSize=2 posInSet=2 selected=false ++++++++++link name='Wild' ++++++++++++staticText name='Wild' ++++++++++++++inlineTextBox name='Wild' -++++treeItem selectable name='Plants' hierarchicalLevel=1 setSize=2 posInSet=2 +++++treeItem name='Plants' hierarchicalLevel=1 setSize=2 posInSet=2 selected=false ++++++link name='Plants' ++++++++staticText name='Plants' -++++++++++inlineTextBox name='Plants' +++++++++++inlineTextBox name='Plants' \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt b/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt index 6926392bb4b93a..24fc2dfa775621 100644 --- a/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-treegrid-expected-blink.txt @@ -1,18 +1,18 @@ rootWebArea ++treeGrid -++++row selectable hierarchicalLevel=1 -++++++cell selectable name='Cell at level 1' +++++row hierarchicalLevel=1 selected=false +++++++cell name='Cell at level 1' selected=false ++++++++staticText name='Cell at level 1' ++++++++++inlineTextBox name='Cell at level 1' -++++row selectable hierarchicalLevel=2 -++++++cell selectable name='Cell at level 2' +++++row hierarchicalLevel=2 selected=false +++++++cell name='Cell at level 2' selected=false ++++++++staticText name='Cell at level 2' ++++++++++inlineTextBox name='Cell at level 2' ++++column ++++tableHeaderContainer ++treeGrid -++++row selectable hierarchicalLevel=1 -++++++cell selectable name='Cell at level 1' +++++row hierarchicalLevel=1 selected=false +++++++cell name='Cell at level 1' selected=false ++++++++staticText name='Cell at level 1' ++++++++++inlineTextBox name='Cell at level 1' ++++column diff --git a/content/test/data/accessibility/aria/aria-undefined-expected-blink.txt b/content/test/data/accessibility/aria/aria-undefined-expected-blink.txt index 195a19d394574f..520b702cbe6d5f 100644 --- a/content/test/data/accessibility/aria/aria-undefined-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-undefined-expected-blink.txt @@ -2,11 +2,11 @@ rootWebArea ++genericContainer name='Atomic undefined' ++textField name='Autocomplete undefined' ++genericContainer name='Busy undefined' -++treeItem selectable name='Checked undefined' +++treeItem name='Checked undefined' selected=false ++genericContainer name='Current undefined' ++genericContainer name='Disabled undefined' ++genericContainer name='Dropeffect undefined' -++treeItem selectable name='Expanded undefined' +++treeItem name='Expanded undefined' selected=false ++genericContainer name='Grabbed undefined' ++button name='Haspopup undefined' ++genericContainer name='Invalid undefined' @@ -21,6 +21,6 @@ rootWebArea ++genericContainer name='Relevant undefined' ++textField name='Required undefined' ++tree multiselectable vertical -++++treeItem selectable name='Selected undefined' -++columnHeader selectable name='Sort undefined' -++genericContainer name='Hidden undefined, display block' +++++treeItem name='Selected undefined' selected=false +++columnHeader name='Sort undefined' selected=false +++genericContainer name='Hidden undefined, display block' \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria-undefined-literal-expected-blink.txt b/content/test/data/accessibility/aria/aria-undefined-literal-expected-blink.txt index 195a19d394574f..520b702cbe6d5f 100644 --- a/content/test/data/accessibility/aria/aria-undefined-literal-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-undefined-literal-expected-blink.txt @@ -2,11 +2,11 @@ rootWebArea ++genericContainer name='Atomic undefined' ++textField name='Autocomplete undefined' ++genericContainer name='Busy undefined' -++treeItem selectable name='Checked undefined' +++treeItem name='Checked undefined' selected=false ++genericContainer name='Current undefined' ++genericContainer name='Disabled undefined' ++genericContainer name='Dropeffect undefined' -++treeItem selectable name='Expanded undefined' +++treeItem name='Expanded undefined' selected=false ++genericContainer name='Grabbed undefined' ++button name='Haspopup undefined' ++genericContainer name='Invalid undefined' @@ -21,6 +21,6 @@ rootWebArea ++genericContainer name='Relevant undefined' ++textField name='Required undefined' ++tree multiselectable vertical -++++treeItem selectable name='Selected undefined' -++columnHeader selectable name='Sort undefined' -++genericContainer name='Hidden undefined, display block' +++++treeItem name='Selected undefined' selected=false +++columnHeader name='Sort undefined' selected=false +++genericContainer name='Hidden undefined, display block' \ No newline at end of file diff --git a/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt b/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt index 726a74fefe7468..2aef9085596824 100644 --- a/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt @@ -5,10 +5,10 @@ rootWebArea ++comboBoxGrouping haspopup name='State' ++++textField activedescendantId=listBoxOption controlsIds=listBox ++listBox -++++listBoxOption selectable name='Alabama' -++++listBoxOption selectable selected name='Alaska' +++++listBoxOption name='Alabama' selected=false +++++listBoxOption name='Alaska' selected=true ++comboBoxGrouping haspopup name='State' ++++textField activedescendantId=listBoxOption controlsIds=listBox ++listBox -++++listBoxOption selectable name='Alabama' -++++listBoxOption selectable name='Alaska' +++++listBoxOption name='Alabama' selected=false +++++listBoxOption name='Alaska' selected=false \ No newline at end of file diff --git a/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt b/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt index 477c3366ae5505..30ed0b9c175792 100644 --- a/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt +++ b/content/test/data/accessibility/aria/table-column-hidden-expected-blink.txt @@ -1,33 +1,33 @@ rootWebArea ++grid ariaColumnCount=4 tableRowCount=3 tableColumnCount=3 cellIds=columnHeader,columnHeader,columnHeader,cell,cell,cell,cell,cell,cell -++++row selectable -++++++columnHeader selectable name='Month' ariaCellColumnIndex=1 ariaCellRowIndex=1 +++++row selected=false +++++++columnHeader name='Month' ariaCellColumnIndex=1 ariaCellRowIndex=1 selected=false ++++++++staticText name='Month' ++++++++++inlineTextBox name='Month' -++++++columnHeader selectable name='Day' ariaCellColumnIndex=2 ariaCellRowIndex=1 +++++++columnHeader name='Day' ariaCellColumnIndex=2 ariaCellRowIndex=1 selected=false ++++++++staticText name='Day' ++++++++++inlineTextBox name='Day' -++++++columnHeader selectable name='Weather' ariaCellColumnIndex=4 ariaCellRowIndex=1 +++++++columnHeader name='Weather' ariaCellColumnIndex=4 ariaCellRowIndex=1 selected=false ++++++++staticText name='Weather' ++++++++++inlineTextBox name='Weather' -++++row selectable -++++++cell selectable name='January' ariaCellColumnIndex=1 ariaCellRowIndex=2 +++++row selected=false +++++++cell name='January' ariaCellColumnIndex=1 ariaCellRowIndex=2 selected=false ++++++++staticText name='January' ++++++++++inlineTextBox name='January' -++++++cell selectable name='01' ariaCellColumnIndex=2 ariaCellRowIndex=2 +++++++cell name='01' ariaCellColumnIndex=2 ariaCellRowIndex=2 selected=false ++++++++staticText name='01' ++++++++++inlineTextBox name='01' -++++++cell selectable name='Sunny' ariaCellColumnIndex=4 ariaCellRowIndex=2 +++++++cell name='Sunny' ariaCellColumnIndex=4 ariaCellRowIndex=2 selected=false ++++++++staticText name='Sunny' ++++++++++inlineTextBox name='Sunny' -++++row selectable -++++++cell selectable name='January' ariaCellColumnIndex=1 ariaCellRowIndex=2 +++++row selected=false +++++++cell name='January' ariaCellColumnIndex=1 ariaCellRowIndex=2 selected=false ++++++++staticText name='January' ++++++++++inlineTextBox name='January' -++++++cell selectable name='02' ariaCellColumnIndex=2 ariaCellRowIndex=2 +++++++cell name='02' ariaCellColumnIndex=2 ariaCellRowIndex=2 selected=false ++++++++staticText name='02' ++++++++++inlineTextBox name='02' -++++++cell selectable name='Rainy' ariaCellColumnIndex=4 ariaCellRowIndex=2 +++++++cell name='Rainy' ariaCellColumnIndex=4 ariaCellRowIndex=2 selected=false ++++++++staticText name='Rainy' ++++++++++inlineTextBox name='Rainy' ++++column @@ -36,4 +36,4 @@ rootWebArea ++++tableHeaderContainer ++paragraph ++++staticText name='done' -++++++inlineTextBox name='done' +++++++inlineTextBox name='done' \ No newline at end of file diff --git a/content/test/data/accessibility/html/action-verbs-expected-blink.txt b/content/test/data/accessibility/html/action-verbs-expected-blink.txt index 73f4c756ce9fb6..6500c028a273fc 100644 --- a/content/test/data/accessibility/html/action-verbs-expected-blink.txt +++ b/content/test/data/accessibility/html/action-verbs-expected-blink.txt @@ -23,7 +23,7 @@ rootWebArea name='Action verbs' ++++++++inlineTextBox name='Summary' ++popUpButton collapsed haspopup defaultActionVerb=open ++++menuListPopup invisible -++++++menuListOption selectable selected name='Pop-up button' defaultActionVerb=select +++++++menuListOption name='Pop-up button' defaultActionVerb=select selected=true ++genericContainer defaultActionVerb=click ++++staticText name='Div with click handler' defaultActionVerb=clickAncestor ++++++inlineTextBox name='Div with click handler' @@ -34,4 +34,4 @@ rootWebArea name='Action verbs' ++menu ++++menuItem name='Menu item 1' defaultActionVerb=select ++++menuItemCheckBox name='Menu item 2' defaultActionVerb=uncheck checkedState=true -++++menuItemRadio name='Menu item 3' defaultActionVerb=check checkedState=false +++++menuItemRadio name='Menu item 3' defaultActionVerb=check checkedState=false \ No newline at end of file diff --git a/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt index ecc69eba72aeb1..401227babbbe48 100644 --- a/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt +++ b/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt @@ -4,5 +4,5 @@ rootWebArea ++region ++++popUpButton collapsed haspopup ++++++menuListPopup invisible -++++++++menuListOption selectable selected name='This should be in the tree.' -++colorWell +++++++++menuListOption name='This should be in the tree.' selected=true +++colorWell \ No newline at end of file diff --git a/content/test/data/accessibility/html/optgroup-expected-blink.txt b/content/test/data/accessibility/html/optgroup-expected-blink.txt index 8da74b7601ba25..ecbaeabcd82435 100644 --- a/content/test/data/accessibility/html/optgroup-expected-blink.txt +++ b/content/test/data/accessibility/html/optgroup-expected-blink.txt @@ -4,14 +4,14 @@ rootWebArea ++++++group name='Enabled' ++++++++staticText name='Enabled' ++++++++++inlineTextBox name='Enabled' -++++++listBoxOption selectable name='One' setSize=4 posInSet=1 -++++++listBoxOption selectable name='Two' setSize=4 posInSet=2 -++++++listBoxOption selectable name='Three' setSize=4 posInSet=3 -++++++listBoxOption selectable name='Four' setSize=4 posInSet=4 +++++++listBoxOption name='One' setSize=4 posInSet=1 selected=false +++++++listBoxOption name='Two' setSize=4 posInSet=2 selected=false +++++++listBoxOption name='Three' setSize=4 posInSet=3 selected=false +++++++listBoxOption name='Four' setSize=4 posInSet=4 selected=false ++++++group name='Disabled' ++++++++staticText name='Disabled' ++++++++++inlineTextBox name='Disabled' ++++++listBoxOption name='One' restriction=disabled setSize=4 posInSet=1 ++++++listBoxOption name='Two' restriction=disabled setSize=4 posInSet=2 ++++++listBoxOption name='Three' restriction=disabled setSize=4 posInSet=3 -++++++listBoxOption name='Four' restriction=disabled setSize=4 posInSet=4 +++++++listBoxOption name='Four' restriction=disabled setSize=4 posInSet=4 \ No newline at end of file diff --git a/content/test/data/accessibility/html/select-expected-blink.txt b/content/test/data/accessibility/html/select-expected-blink.txt index 0604ec463daa9f..4e5f3620905026 100644 --- a/content/test/data/accessibility/html/select-expected-blink.txt +++ b/content/test/data/accessibility/html/select-expected-blink.txt @@ -2,24 +2,24 @@ rootWebArea focusable ++genericContainer ++++popUpButton collapsed focusable haspopup ++++++menuListPopup invisible -++++++++menuListOption focusable selectable selected name='Placeholder option' -++++++++menuListOption focusable invisible selectable name='Option 1' -++++++++menuListOption focusable invisible selectable name='Option 2' +++++++++menuListOption focusable name='Placeholder option' selected=true +++++++++menuListOption focusable invisible name='Option 1' selected=false +++++++++menuListOption focusable invisible name='Option 2' selected=false ++++popUpButton collapsed focusable haspopup ++++++menuListPopup invisible -++++++++menuListOption focusable invisible selectable name='Option 1' -++++++++menuListOption focusable selectable selected name='Option 2' -++++++++menuListOption focusable invisible selectable name='Option 3' +++++++++menuListOption focusable invisible name='Option 1' selected=false +++++++++menuListOption focusable name='Option 2' selected=true +++++++++menuListOption focusable invisible name='Option 3' selected=false ++++popUpButton collapsed focusable haspopup required ++++++menuListPopup invisible -++++++++menuListOption focusable selectable selected name='Option 1' -++++++++menuListOption focusable invisible selectable name='Option 2' -++++++++menuListOption focusable invisible selectable name='Option 3' +++++++++menuListOption focusable name='Option 1' selected=true +++++++++menuListOption focusable invisible name='Option 2' selected=false +++++++++menuListOption focusable invisible name='Option 3' selected=false ++++listBox focusable multiselectable -++++++listBoxOption focusable selectable name='Option 1' setSize=3 posInSet=1 -++++++listBoxOption focusable selectable name='Option 2' setSize=3 posInSet=2 -++++++listBoxOption focusable selectable name='Option 3' setSize=3 posInSet=3 +++++++listBoxOption focusable name='Option 1' setSize=3 posInSet=1 selected=false +++++++listBoxOption focusable name='Option 2' setSize=3 posInSet=2 selected=false +++++++listBoxOption focusable name='Option 3' setSize=3 posInSet=3 selected=false ++++listBox focusable -++++++listBoxOption focusable selectable name='Option 1' setSize=3 posInSet=1 -++++++listBoxOption focusable selectable name='Option 2' setSize=3 posInSet=2 -++++++listBoxOption focusable selectable name='Option 3' setSize=3 posInSet=3 +++++++listBoxOption focusable name='Option 1' setSize=3 posInSet=1 selected=false +++++++listBoxOption focusable name='Option 2' setSize=3 posInSet=2 selected=false +++++++listBoxOption focusable name='Option 3' setSize=3 posInSet=3 selected=false \ No newline at end of file diff --git a/third_party/closure_compiler/externs/automation.js b/third_party/closure_compiler/externs/automation.js index 1443b942c9f2dd..50977a9c395511 100644 --- a/third_party/closure_compiler/externs/automation.js +++ b/third_party/closure_compiler/externs/automation.js @@ -233,8 +233,6 @@ chrome.automation.StateType = { PROTECTED: 'protected', REQUIRED: 'required', RICHLY_EDITABLE: 'richlyEditable', - SELECTABLE: 'selectable', - SELECTED: 'selected', VERTICAL: 'vertical', VISITED: 'visited', }; @@ -1126,6 +1124,13 @@ chrome.automation.AutomationNode.prototype.underline; */ chrome.automation.AutomationNode.prototype.lineThrough; +/** + * Indicates whether this node is selected, unselected, or neither. + * @type {(boolean|undefined)} + * @see https://developer.chrome.com/extensions/automation#type-selected + */ +chrome.automation.AutomationNode.prototype.selected; + /** * Walking the tree. * @type {!Array} diff --git a/ui/accessibility/ax_enum_util.cc b/ui/accessibility/ax_enum_util.cc index b9d4c9e55d7bb6..8c80b463557d35 100644 --- a/ui/accessibility/ax_enum_util.cc +++ b/ui/accessibility/ax_enum_util.cc @@ -788,10 +788,6 @@ const char* ToString(ax::mojom::State state) { return "required"; case ax::mojom::State::kRichlyEditable: return "richlyEditable"; - case ax::mojom::State::kSelectable: - return "selectable"; - case ax::mojom::State::kSelected: - return "selected"; case ax::mojom::State::kVertical: return "vertical"; case ax::mojom::State::kVisited: @@ -836,10 +832,6 @@ ax::mojom::State ParseState(const char* state) { return ax::mojom::State::kRequired; if (0 == strcmp(state, "richlyEditable")) return ax::mojom::State::kRichlyEditable; - if (0 == strcmp(state, "selectable")) - return ax::mojom::State::kSelectable; - if (0 == strcmp(state, "selected")) - return ax::mojom::State::kSelected; if (0 == strcmp(state, "vertical")) return ax::mojom::State::kVertical; if (0 == strcmp(state, "visited")) @@ -1439,6 +1431,8 @@ const char* ToString(ax::mojom::BoolAttribute bool_attribute) { return "clickable"; case ax::mojom::BoolAttribute::kClipsChildren: return "clipsChildren"; + case ax::mojom::BoolAttribute::kSelected: + return "selected"; } return ""; @@ -1469,6 +1463,8 @@ ax::mojom::BoolAttribute ParseBoolAttribute(const char* bool_attribute) { return ax::mojom::BoolAttribute::kClickable; if (0 == strcmp(bool_attribute, "clipsChildren")) return ax::mojom::BoolAttribute::kClipsChildren; + if (0 == strcmp(bool_attribute, "selected")) + return ax::mojom::BoolAttribute::kSelected; return ax::mojom::BoolAttribute::kNone; } diff --git a/ui/accessibility/ax_enums.mojom b/ui/accessibility/ax_enums.mojom index 9a54ec987f2b13..6fdd752c34e580 100644 --- a/ui/accessibility/ax_enums.mojom +++ b/ui/accessibility/ax_enums.mojom @@ -241,8 +241,6 @@ enum State { kProtected, kRequired, kRichlyEditable, - kSelectable, - kSelected, // Grows vertically, e.g. menu or combo box. kVertical, kVisited, @@ -504,6 +502,14 @@ enum FloatAttribute { kFontSize, }; +// These attributes can take three states: +// true, false, or undefined/unset. +// +// Some attributes are only ever true or unset. In these cases, undefined is +// equivalent to false. In other attributes, all three states have meaning. +// +// Finally, note that different tree sources can use all three states for a +// given attribute, while another tree source only uses two. enum BoolAttribute { kNone, // Generic busy state, does not have to be on a live region. @@ -536,6 +542,9 @@ enum BoolAttribute { // Indicates that this node clips its children, i.e. may have // overflow: hidden or clip children by default. kClipsChildren, + + // Indicates whether this node is selected or unselected. + kSelected, }; enum IntListAttribute { diff --git a/ui/accessibility/ax_event_generator.cc b/ui/accessibility/ax_event_generator.cc index 9d0b644a35db21..2c132265225bf5 100644 --- a/ui/accessibility/ax_event_generator.cc +++ b/ui/accessibility/ax_event_generator.cc @@ -141,16 +141,6 @@ void AXEventGenerator::OnStateChanged(AXTree* tree, AddEvent(container, Event::ROW_COUNT_CHANGED); } break; - case ax::mojom::State::kSelected: { - AddEvent(node, Event::SELECTED_CHANGED); - ui::AXNode* container = node; - while (container && - !ui::IsContainerWithSelectableChildrenRole(container->data().role)) - container = container->parent(); - if (container) - AddEvent(container, Event::SELECTED_CHILDREN_CHANGED); - break; - } case ax::mojom::State::kIgnored: { ui::AXNode* unignored_parent = node->GetUnignoredParent(); if (unignored_parent) @@ -251,6 +241,17 @@ void AXEventGenerator::OnBoolAttributeChanged(AXTree* tree, bool new_value) { DCHECK_EQ(tree_, tree); + if (attr == ax::mojom::BoolAttribute::kSelected) { + AddEvent(node, Event::SELECTED_CHANGED); + ui::AXNode* container = node; + while (container && + !ui::IsContainerWithSelectableChildrenRole(container->data().role)) + container = container->parent(); + if (container) + AddEvent(container, Event::SELECTED_CHILDREN_CHANGED); + return; + } + AddEvent(node, Event::OTHER_ATTRIBUTE_CHANGED); } diff --git a/ui/accessibility/ax_event_generator_unittest.cc b/ui/accessibility/ax_event_generator_unittest.cc index 2d3f192568f43f..2cbbb9e02ab4ff 100644 --- a/ui/accessibility/ax_event_generator_unittest.cc +++ b/ui/accessibility/ax_event_generator_unittest.cc @@ -228,20 +228,23 @@ TEST(AXEventGeneratorTest, SelectedAndSelectedChildren) { initial_state.nodes[2].role = ax::mojom::Role::kMenuItem; initial_state.nodes[3].id = 4; initial_state.nodes[3].role = ax::mojom::Role::kListBoxOption; - initial_state.nodes[3].AddState(ax::mojom::State::kSelected); + initial_state.nodes[3].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, + true); AXTree tree(initial_state); AXEventGenerator event_generator(&tree); AXTreeUpdate update = initial_state; - update.nodes[2].AddState(ax::mojom::State::kSelected); - update.nodes[3].state = 0; + update.nodes[2].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes.pop_back(); + update.nodes.emplace_back(); + update.nodes[3].id = 4; + update.nodes[3].role = ax::mojom::Role::kListBoxOption; + update.nodes[3].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, false); EXPECT_TRUE(tree.Unserialize(update)); EXPECT_EQ( "SELECTED_CHANGED on 3, " "SELECTED_CHANGED on 4, " - "SELECTED_CHILDREN_CHANGED on 2, " - "STATE_CHANGED on 3, " - "STATE_CHANGED on 4", + "SELECTED_CHILDREN_CHANGED on 2", DumpEvents(&event_generator)); } diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc index acc24f4fd277a8..ac0c81ea87a82b 100644 --- a/ui/accessibility/ax_node_data.cc +++ b/ui/accessibility/ax_node_data.cc @@ -1001,6 +1001,9 @@ std::string AXNodeData::ToString() const { case ax::mojom::BoolAttribute::kClipsChildren: result += " clips_children=" + value; break; + case ax::mojom::BoolAttribute::kSelected: + result += " selected=" + value; + break; case ax::mojom::BoolAttribute::kNone: break; } diff --git a/ui/accessibility/platform/ax_platform_node_auralinux.cc b/ui/accessibility/platform/ax_platform_node_auralinux.cc index ed48d127c31f3f..b73cd96f754a47 100644 --- a/ui/accessibility/platform/ax_platform_node_auralinux.cc +++ b/ui/accessibility/platform/ax_platform_node_auralinux.cc @@ -986,9 +986,9 @@ void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) { atk_state_set_add_state(atk_state_set, ATK_STATE_HAS_POPUP); #endif #endif - if (data.HasState(ax::mojom::State::kSelected)) + if (data.GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)) atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED); - if (data.HasState(ax::mojom::State::kSelectable)) + if (data.HasBoolAttribute(ax::mojom::BoolAttribute::kSelected)) atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE); // Checked state diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibility/platform/ax_platform_node_mac.mm index 81677fcf07ce43..6c12a5cb1646fd 100644 --- a/ui/accessibility/platform/ax_platform_node_mac.mm +++ b/ui/accessibility/platform/ax_platform_node_mac.mm @@ -516,7 +516,8 @@ - (BOOL)accessibilityIsAttributeSettable:(NSString*)attributeName { // Since tabs use the Radio Button role on Mac, the standard way to set // them is via the value attribute rather than the selected attribute. if (node_->GetData().role == ax::mojom::Role::kTab) - return !node_->GetData().HasState(ax::mojom::State::kSelected); + return !node_->GetData().GetBoolAttribute( + ax::mojom::BoolAttribute::kSelected); return restriction != ax::mojom::Restriction::kReadOnly; } @@ -721,7 +722,8 @@ - (NSString*)AXTitle { // Misc attributes. - (NSNumber*)AXSelected { - return @(node_->GetData().HasState(ax::mojom::State::kSelected)); + return + @(node_->GetData().GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)); } - (NSString*)AXPlaceholderValue { diff --git a/ui/accessibility/platform/ax_platform_node_unittest.cc b/ui/accessibility/platform/ax_platform_node_unittest.cc index 9cb8b4428a3bb5..29a5404d084516 100644 --- a/ui/accessibility/platform/ax_platform_node_unittest.cc +++ b/ui/accessibility/platform/ax_platform_node_unittest.cc @@ -74,7 +74,7 @@ AXTreeUpdate AXPlatformNodeTest::BuildTextFieldWithSelectionRange( text_field_node.id = 1; text_field_node.role = ax::mojom::Role::kTextField; text_field_node.AddState(ax::mojom::State::kEditable); - text_field_node.AddState(ax::mojom::State::kSelected); + text_field_node.AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); text_field_node.AddIntAttribute(ax::mojom::IntAttribute::kTextSelStart, start); text_field_node.AddIntAttribute(ax::mojom::IntAttribute::kTextSelEnd, stop); @@ -108,7 +108,8 @@ AXTreeUpdate AXPlatformNodeTest::BuildContentEditableWithSelectionRange( content_editable_node.id = 1; content_editable_node.role = ax::mojom::Role::kGroup; content_editable_node.AddState(ax::mojom::State::kRichlyEditable); - content_editable_node.AddState(ax::mojom::State::kSelected); + content_editable_node.AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, + true); content_editable_node.AddBoolAttribute( ax::mojom::BoolAttribute::kEditableRoot, true); content_editable_node.SetValue("How now brown cow."); diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc index e50667eeee433b..8a0e88b2ecb833 100644 --- a/ui/accessibility/platform/ax_platform_node_win.cc +++ b/ui/accessibility/platform/ax_platform_node_win.cc @@ -852,7 +852,8 @@ STDMETHODIMP AXPlatformNodeWin::get_accSelection(VARIANT* selected) { for (int i = 0; i < delegate_->GetChildCount(); ++i) { auto* node = static_cast( FromNativeViewAccessible(delegate_->ChildAtIndex(i))); - if (node && node->GetData().HasState(ax::mojom::State::kSelected)) + if (node && + node->GetData().GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)) selected_nodes.emplace_back(node); } @@ -1448,7 +1449,8 @@ STDMETHODIMP AXPlatformNodeWin::get_nSelectedChildren(LONG* cell_count) { for (int r = 0; r < rows; ++r) { for (int c = 0; c < columns; ++c) { AXPlatformNodeBase* cell = GetTableCell(r, c); - if (cell && cell->GetData().HasState(ax::mojom::State::kSelected)) + if (cell && + cell->GetData().GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)) result++; } } @@ -1475,7 +1477,8 @@ STDMETHODIMP AXPlatformNodeWin::get_nSelectedColumns(LONG* column_count) { bool selected = true; for (int r = 0; r < rows && selected == true; ++r) { AXPlatformNodeBase* cell = GetTableCell(r, c); - if (!cell || !(cell->GetData().HasState(ax::mojom::State::kSelected))) + if (!cell || !(cell->GetData().GetBoolAttribute( + ax::mojom::BoolAttribute::kSelected))) selected = false; } if (selected) @@ -1505,7 +1508,8 @@ STDMETHODIMP AXPlatformNodeWin::get_nSelectedRows(LONG* row_count) { bool selected = true; for (int c = 0; c < columns && selected == true; ++c) { AXPlatformNodeBase* cell = GetTableCell(r, c); - if (!cell || !(cell->GetData().HasState(ax::mojom::State::kSelected))) + if (!cell || !(cell->GetData().GetBoolAttribute( + ax::mojom::BoolAttribute::kSelected))) selected = false; } if (selected) @@ -1615,7 +1619,8 @@ STDMETHODIMP AXPlatformNodeWin::get_selectedChildren(LONG max_children, for (int r = 0; r < rows; ++r) { for (int c = 0; c < columns; ++c) { AXPlatformNodeBase* cell = GetTableCell(r, c); - if (cell && cell->GetData().HasState(ax::mojom::State::kSelected)) + if (cell && + cell->GetData().GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)) // index is row index * column count + column index. results.push_back(r * columns + c); } @@ -1644,7 +1649,8 @@ STDMETHODIMP AXPlatformNodeWin::get_selectedColumns(LONG max_columns, bool selected = true; for (int r = 0; r < row_count && selected == true; ++r) { AXPlatformNodeBase* cell = GetTableCell(r, c); - if (!cell || !(cell->GetData().HasState(ax::mojom::State::kSelected))) + if (!cell || !(cell->GetData().GetBoolAttribute( + ax::mojom::BoolAttribute::kSelected))) selected = false; } if (selected) @@ -1672,7 +1678,8 @@ STDMETHODIMP AXPlatformNodeWin::get_selectedRows(LONG max_rows, bool selected = true; for (int c = 0; c < column_count && selected == true; ++c) { AXPlatformNodeBase* cell = GetTableCell(r, c); - if (!cell || !(cell->GetData().HasState(ax::mojom::State::kSelected))) + if (!cell || !(cell->GetData().GetBoolAttribute( + ax::mojom::BoolAttribute::kSelected))) selected = false; } if (selected) @@ -1709,7 +1716,8 @@ STDMETHODIMP AXPlatformNodeWin::get_isColumnSelected(LONG column, for (int r = 0; r < rows; ++r) { AXPlatformNodeBase* cell = GetTableCell(r, column); - if (!cell || !(cell->GetData().HasState(ax::mojom::State::kSelected))) + if (!cell || !(cell->GetData().GetBoolAttribute( + ax::mojom::BoolAttribute::kSelected))) return S_OK; } @@ -1732,7 +1740,8 @@ STDMETHODIMP AXPlatformNodeWin::get_isRowSelected(LONG row, for (int c = 0; c < columns; ++c) { AXPlatformNodeBase* cell = GetTableCell(row, c); - if (!cell || !(cell->GetData().HasState(ax::mojom::State::kSelected))) + if (!cell || !(cell->GetData().GetBoolAttribute( + ax::mojom::BoolAttribute::kSelected))) return S_OK; } @@ -1756,7 +1765,8 @@ STDMETHODIMP AXPlatformNodeWin::get_isSelected(LONG row, return S_FALSE; AXPlatformNodeBase* cell = GetTableCell(row, column); - if (cell && cell->GetData().HasState(ax::mojom::State::kSelected)) + if (cell && + cell->GetData().GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)) *is_selected = true; return S_OK; @@ -1873,7 +1883,8 @@ STDMETHODIMP AXPlatformNodeWin::get_selectedCells(IUnknown*** cells, for (int r = 0; r < rows; ++r) { for (int c = 0; c < columns; ++c) { AXPlatformNodeBase* cell = GetTableCell(r, c); - if (cell && cell->GetData().HasState(ax::mojom::State::kSelected)) + if (cell && + cell->GetData().GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)) selected.push_back(cell); } } @@ -3393,7 +3404,7 @@ bool AXPlatformNodeWin::ShouldNodeHaveFocusableState( case ax::mojom::Role::kListBoxOption: case ax::mojom::Role::kMenuListOption: - if (data.HasState(ax::mojom::State::kSelectable)) + if (data.HasBoolAttribute(ax::mojom::BoolAttribute::kSelected)) return true; break; @@ -3473,10 +3484,10 @@ int AXPlatformNodeWin::MSAAState() { // TODO(dougt) unhandled ux::ax::mojom::State::kRequired // TODO(dougt) unhandled ux::ax::mojom::State::kRichlyEditable - if (data.HasState(ax::mojom::State::kSelectable)) + if (data.HasBoolAttribute(ax::mojom::BoolAttribute::kSelected)) msaa_state |= STATE_SYSTEM_SELECTABLE; - if (data.HasState(ax::mojom::State::kSelected)) + if (data.GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)) msaa_state |= STATE_SYSTEM_SELECTED; // TODO(dougt) unhandled VERTICAL @@ -3533,7 +3544,7 @@ int AXPlatformNodeWin::MSAAState() { // to focus. This helps NVDA read the selected option as it changes. if ((data.role == ax::mojom::Role::kListBoxOption || data.role == ax::mojom::Role::kMenuItem) && - data.HasState(ax::mojom::State::kSelected)) { + data.GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)) { AXPlatformNodeBase* container = FromNativeViewAccessible(GetParent()); if (container && container->GetParent() == focus) { ui::AXNodeData container_data = container->GetData(); diff --git a/ui/accessibility/platform/ax_platform_node_win_unittest.cc b/ui/accessibility/platform/ax_platform_node_win_unittest.cc index 20de83957ca8fc..ac24063a4f9538 100644 --- a/ui/accessibility/platform/ax_platform_node_win_unittest.cc +++ b/ui/accessibility/platform/ax_platform_node_win_unittest.cc @@ -295,7 +295,7 @@ TEST_F(AXPlatformNodeWinTest, AXNodeData list_item_1; list_item_1.id = 1; list_item_1.role = ax::mojom::Role::kListBoxOption; - list_item_1.AddState(ax::mojom::State::kSelected); + list_item_1.AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); list_item_1.SetName("Name1"); AXNodeData list_item_2; @@ -327,13 +327,13 @@ TEST_F(AXPlatformNodeWinTest, AXNodeData list_item_1; list_item_1.id = 1; list_item_1.role = ax::mojom::Role::kListBoxOption; - list_item_1.AddState(ax::mojom::State::kSelected); + list_item_1.AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); list_item_1.SetName("Name1"); AXNodeData list_item_2; list_item_2.id = 2; list_item_2.role = ax::mojom::Role::kListBoxOption; - list_item_2.AddState(ax::mojom::State::kSelected); + list_item_2.AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); list_item_2.SetName("Name2"); AXNodeData list_item_3; @@ -415,7 +415,7 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleSelectionTableRowOneSelected) { AXTreeUpdate update = Build3X3Table(); // 5 == table_row_1 - update.nodes[5].AddState(ax::mojom::State::kSelected); + update.nodes[5].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -443,8 +443,8 @@ TEST_F(AXPlatformNodeWinTest, // 5 == table_row_1 // 9 == table_row_2 - update.nodes[5].AddState(ax::mojom::State::kSelected); - update.nodes[9].AddState(ax::mojom::State::kSelected); + update.nodes[5].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[9].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -505,7 +505,7 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleSelectionTableCellOneSelected) { AXTreeUpdate update = Build3X3Table(); // 7 == table_cell_1 - update.nodes[7].AddState(ax::mojom::State::kSelected); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -543,8 +543,8 @@ TEST_F(AXPlatformNodeWinTest, // 11 == table_cell_3 // 12 == table_cell_4 - update.nodes[11].AddState(ax::mojom::State::kSelected); - update.nodes[12].AddState(ax::mojom::State::kSelected); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[12].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1647,7 +1647,7 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetNSelectedChildrenOne) { AXTreeUpdate update = Build3X3Table(); // 7 == table_cell_1 - update.nodes[7].AddState(ax::mojom::State::kSelected); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); ComPtr cell = GetCellInTable(); @@ -1672,10 +1672,10 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetNSelectedChildrenMany) { // 8 == table_cell_2 // 11 == table_cell_3 // 12 == table_cell_4 - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[8].AddState(ax::mojom::State::kSelected); - update.nodes[11].AddState(ax::mojom::State::kSelected); - update.nodes[12].AddState(ax::mojom::State::kSelected); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[8].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[12].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1718,9 +1718,9 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetNSelectedColumnsOne) { // 3 == table_column_header_2 // 7 == table_cell_1 // 11 == table_cell_3 - update.nodes[3].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[11].AddState(ax::mojom::State::kSelected); + update.nodes[3].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1745,16 +1745,16 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetNSelectedColumnsMany) { // 3 == table_column_header_2 // 7 == table_cell_1 // 11 == table_cell_3 - update.nodes[3].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[11].AddState(ax::mojom::State::kSelected); + update.nodes[3].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); // 4 == table_column_header_3 // 8 == table_cell_2 // 12 == table_cell_4 - update.nodes[4].AddState(ax::mojom::State::kSelected); - update.nodes[8].AddState(ax::mojom::State::kSelected); - update.nodes[12].AddState(ax::mojom::State::kSelected); + update.nodes[4].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[8].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[12].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1797,9 +1797,9 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetNSelectedRowsOne) { // 6 == table_row_header_1 // 7 == table_cell_1 // 8 == table_cell_2 - update.nodes[6].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[8].AddState(ax::mojom::State::kSelected); + update.nodes[6].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[8].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1824,16 +1824,16 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetNSelectedRowsMany) { // 6 == table_row_header_3 // 7 == table_cell_1 // 8 == table_cell_2 - update.nodes[6].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[8].AddState(ax::mojom::State::kSelected); + update.nodes[6].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[8].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); // 10 == table_row_header_3 // 11 == table_cell_1 // 12 == table_cell_2 - update.nodes[10].AddState(ax::mojom::State::kSelected); - update.nodes[11].AddState(ax::mojom::State::kSelected); - update.nodes[12].AddState(ax::mojom::State::kSelected); + update.nodes[10].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[12].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1857,8 +1857,8 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetSelectedChildren) { // 7 == table_cell_1 // 12 == table_cell_4 - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[12].AddState(ax::mojom::State::kSelected); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[12].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1886,8 +1886,8 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetSelectedChildrenZeroMax) { // 7 == table_cell_1 // 12 == table_cell_4 - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[12].AddState(ax::mojom::State::kSelected); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[12].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1911,8 +1911,8 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetSelectedColumnsZero) { // 7 == table_cell_1 // 11 == table_cell_3 - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[11].AddState(ax::mojom::State::kSelected); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1940,9 +1940,9 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetSelectedColumnsOne) { // 3 == table_column_header_2 // 7 == table_cell_1 // 11 == table_cell_3 - update.nodes[3].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[11].AddState(ax::mojom::State::kSelected); + update.nodes[3].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -1971,16 +1971,16 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetSelectedColumnsMany) { // 3 == table_column_header_2 // 7 == table_cell_1 // 11 == table_cell_3 - update.nodes[3].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[11].AddState(ax::mojom::State::kSelected); + update.nodes[3].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); // 4 == table_column_header_3 // 8 == table_cell_2 // 12 == table_cell_4 - update.nodes[4].AddState(ax::mojom::State::kSelected); - update.nodes[8].AddState(ax::mojom::State::kSelected); - update.nodes[12].AddState(ax::mojom::State::kSelected); + update.nodes[4].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[8].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[12].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -2030,9 +2030,9 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetSelectedRowsOne) { // 6 == table_row_header_1 // 7 == table_cell_1 // 8 == table_cell_2 - update.nodes[6].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[8].AddState(ax::mojom::State::kSelected); + update.nodes[6].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[8].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -2060,16 +2060,16 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableGetSelectedRowsMany) { // 6 == table_row_header_3 // 7 == table_cell_1 // 8 == table_cell_2 - update.nodes[6].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[8].AddState(ax::mojom::State::kSelected); + update.nodes[6].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[8].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); // 10 == table_row_header_3 // 11 == table_cell_1 // 12 == table_cell_2 - update.nodes[10].AddState(ax::mojom::State::kSelected); - update.nodes[11].AddState(ax::mojom::State::kSelected); - update.nodes[12].AddState(ax::mojom::State::kSelected); + update.nodes[10].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[12].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -2098,9 +2098,9 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableIsColumnSelected) { // 3 == table_column_header_2 // 7 == table_cell_1 // 11 == table_cell_3 - update.nodes[3].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[11].AddState(ax::mojom::State::kSelected); + update.nodes[3].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[11].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -2134,9 +2134,9 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableIsRowSelected) { // 6 == table_row_header_3 // 7 == table_cell_1 // 8 == table_cell_2 - update.nodes[6].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[8].AddState(ax::mojom::State::kSelected); + update.nodes[6].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[8].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -2170,9 +2170,9 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTableIsSelected) { // 6 == table_row_header_3 // 7 == table_cell_1 // 8 == table_cell_2 - update.nodes[6].AddState(ax::mojom::State::kSelected); - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[8].AddState(ax::mojom::State::kSelected); + update.nodes[6].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[8].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); @@ -2235,8 +2235,8 @@ TEST_F(AXPlatformNodeWinTest, TestIAccessibleTable2GetSelectedChildren) { // 7 == table_cell_1 // 12 == table_cell_4 - update.nodes[7].AddState(ax::mojom::State::kSelected); - update.nodes[12].AddState(ax::mojom::State::kSelected); + update.nodes[7].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); + update.nodes[12].AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, true); Init(update); diff --git a/ui/views/controls/tabbed_pane/tabbed_pane.cc b/ui/views/controls/tabbed_pane/tabbed_pane.cc index 7c44a024a404f8..bc33e72aca47d3 100644 --- a/ui/views/controls/tabbed_pane/tabbed_pane.cc +++ b/ui/views/controls/tabbed_pane/tabbed_pane.cc @@ -286,9 +286,7 @@ void Tab::OnPaint(gfx::Canvas* canvas) { void Tab::GetAccessibleNodeData(ui::AXNodeData* data) { data->role = ax::mojom::Role::kTab; data->SetName(title()->text()); - data->AddState(ax::mojom::State::kSelectable); - if (selected()) - data->AddState(ax::mojom::State::kSelected); + data->AddBoolAttribute(ax::mojom::BoolAttribute::kSelected, selected()); } bool Tab::HandleAccessibleAction(const ui::AXActionData& action_data) { diff --git a/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc b/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc index 02bb3cf82c84c4..082ea644820fdc 100644 --- a/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc +++ b/ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc @@ -226,8 +226,8 @@ TEST_F(TabbedPaneTest, SelectTabWithAccessibleAction) { EXPECT_EQ(ax::mojom::Role::kTab, data.role); EXPECT_EQ(DefaultTabTitle(), data.GetString16Attribute(ax::mojom::StringAttribute::kName)); - EXPECT_TRUE(data.HasState(ax::mojom::State::kSelectable)); - EXPECT_EQ(i == 0, data.HasState(ax::mojom::State::kSelected)); + EXPECT_EQ(i == 0, + data.GetBoolAttribute(ax::mojom::BoolAttribute::kSelected)); } ui::AXActionData action; diff --git a/ui/views/controls/table/table_view.cc b/ui/views/controls/table/table_view.cc index d1e4bef4856510..d7f37cf103f99d 100644 --- a/ui/views/controls/table/table_view.cc +++ b/ui/views/controls/table/table_view.cc @@ -463,9 +463,9 @@ void TableView::GetAccessibleNodeData(ui::AXNodeData* node_data) { node_data->role = ax::mojom::Role::kRow; node_data->AddIntAttribute(ax::mojom::IntAttribute::kPosInSet, selection_model_.active()); - if (selection_model_.IsSelected(selection_model_.active())) { - node_data->AddState(ax::mojom::State::kSelected); - } + node_data->AddBoolAttribute( + ax::mojom::BoolAttribute::kSelected, + selection_model_.IsSelected(selection_model_.active())); // Generate accessible name from column headers and selected cell text. std::vector name_parts;