Commit 6272af25 authored by Jacques Newman's avatar Jacques Newman Committed by Commit Bot

Fix role=switch type and description.

Bug: 1019947
Change-Id: Ie19d410e0fc5e07b1ebc1fcdf3d94a94dfce9a6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1888188Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarAlice Boxhall <aboxhall@chromium.org>
Reviewed-by: default avatarKurt Catti-Schmidt <kschmi@microsoft.com>
Commit-Queue: Jacques Newman <janewman@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#711592}
parent 594ca47b
...@@ -1957,6 +1957,9 @@ base::string16 BrowserAccessibility::GetLocalizedStringForRoleDescription() ...@@ -1957,6 +1957,9 @@ base::string16 BrowserAccessibility::GetLocalizedStringForRoleDescription()
case ax::mojom::Role::kStrong: case ax::mojom::Role::kStrong:
return content_client->GetLocalizedString(IDS_AX_ROLE_STRONG); return content_client->GetLocalizedString(IDS_AX_ROLE_STRONG);
case ax::mojom::Role::kSwitch:
return content_client->GetLocalizedString(IDS_AX_ROLE_SWITCH);
case ax::mojom::Role::kTextField: { case ax::mojom::Role::kTextField: {
std::string input_type; std::string input_type;
if (data.GetStringAttribute(ax::mojom::StringAttribute::kInputType, if (data.GetStringAttribute(ax::mojom::StringAttribute::kInputType,
......
...@@ -11,7 +11,7 @@ document Name='Action verbs' ...@@ -11,7 +11,7 @@ document Name='Action verbs'
++checkbox Toggle.ToggleState='Off' ++checkbox Toggle.ToggleState='Off'
++checkbox Toggle.ToggleState='On' ++checkbox Toggle.ToggleState='On'
++radio SelectionItem.IsSelected=false ++radio SelectionItem.IsSelected=false
++checkbox Name='ARIA Switch' Toggle.ToggleState='Off' ++switch Name='ARIA Switch' Toggle.ToggleState='Off'
++group ++group
++++button Name='Summary' ExpandCollapse.ExpandCollapseState='Collapsed' ++++button Name='Summary' ExpandCollapse.ExpandCollapseState='Collapsed'
++++++description Name='Summary' ++++++description Name='Summary'
......
...@@ -5796,7 +5796,7 @@ base::string16 AXPlatformNodeWin::UIAAriaRole() { ...@@ -5796,7 +5796,7 @@ base::string16 AXPlatformNodeWin::UIAAriaRole() {
return L"strong"; return L"strong";
case ax::mojom::Role::kSwitch: case ax::mojom::Role::kSwitch:
return L"checkbox"; return L"switch";
case ax::mojom::Role::kRubyAnnotation: case ax::mojom::Role::kRubyAnnotation:
case ax::mojom::Role::kListMarker: case ax::mojom::Role::kListMarker:
...@@ -6447,7 +6447,7 @@ LONG AXPlatformNodeWin::ComputeUIAControlType() { // NOLINT(runtime/int) ...@@ -6447,7 +6447,7 @@ LONG AXPlatformNodeWin::ComputeUIAControlType() { // NOLINT(runtime/int)
return UIA_SpinnerControlTypeId; return UIA_SpinnerControlTypeId;
case ax::mojom::Role::kSwitch: case ax::mojom::Role::kSwitch:
return UIA_CheckBoxControlTypeId; return UIA_ButtonControlTypeId;
case ax::mojom::Role::kRubyAnnotation: case ax::mojom::Role::kRubyAnnotation:
case ax::mojom::Role::kListMarker: case ax::mojom::Role::kListMarker:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment