Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 634533002: Fixing IA2 role for input type attribute in button and checkbox state with menu and aria role menu … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/accessibility/browser_accessibility_win.h" 5 #include "content/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include <UIAutomationClient.h> 7 #include <UIAutomationClient.h>
8 #include <UIAutomationCoreApi.h> 8 #include <UIAutomationCoreApi.h>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after
3613 break; 3613 break;
3614 case ui::AX_ROLE_MENU_BAR: 3614 case ui::AX_ROLE_MENU_BAR:
3615 ia_role_ = ROLE_SYSTEM_MENUBAR; 3615 ia_role_ = ROLE_SYSTEM_MENUBAR;
3616 break; 3616 break;
3617 case ui::AX_ROLE_MENU_ITEM: 3617 case ui::AX_ROLE_MENU_ITEM:
3618 ia_role_ = ROLE_SYSTEM_MENUITEM; 3618 ia_role_ = ROLE_SYSTEM_MENUITEM;
3619 break; 3619 break;
3620 case ui::AX_ROLE_MENU_ITEM_CHECK_BOX: 3620 case ui::AX_ROLE_MENU_ITEM_CHECK_BOX:
3621 ia_role_ = ROLE_SYSTEM_MENUITEM; 3621 ia_role_ = ROLE_SYSTEM_MENUITEM;
3622 ia2_role_ = IA2_ROLE_CHECK_MENU_ITEM; 3622 ia2_role_ = IA2_ROLE_CHECK_MENU_ITEM;
3623 ia2_state_ |= IA2_STATE_CHECKABLE;
3623 break; 3624 break;
3624 case ui::AX_ROLE_MENU_ITEM_RADIO: 3625 case ui::AX_ROLE_MENU_ITEM_RADIO:
dmazzoni 2014/10/13 07:54:46 A radio should be checkable too. The html spec say
3625 ia_role_ = ROLE_SYSTEM_MENUITEM; 3626 ia_role_ = ROLE_SYSTEM_MENUITEM;
3626 ia2_role_ = IA2_ROLE_RADIO_MENU_ITEM; 3627 ia2_role_ = IA2_ROLE_RADIO_MENU_ITEM;
3627 break; 3628 break;
3628 case ui::AX_ROLE_MENU_LIST_POPUP: 3629 case ui::AX_ROLE_MENU_LIST_POPUP:
3629 ia_role_ = ROLE_SYSTEM_CLIENT; 3630 ia_role_ = ROLE_SYSTEM_CLIENT;
3630 break; 3631 break;
3631 case ui::AX_ROLE_MENU_LIST_OPTION: 3632 case ui::AX_ROLE_MENU_LIST_OPTION:
3632 ia_role_ = ROLE_SYSTEM_LISTITEM; 3633 ia_role_ = ROLE_SYSTEM_LISTITEM;
3633 if (ia_state_ & STATE_SYSTEM_SELECTABLE) { 3634 if (ia_state_ & STATE_SYSTEM_SELECTABLE) {
3634 ia_state_ |= STATE_SYSTEM_FOCUSABLE; 3635 ia_state_ |= STATE_SYSTEM_FOCUSABLE;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3835 // The role should always be set. 3836 // The role should always be set.
3836 DCHECK(!role_name_.empty() || ia_role_); 3837 DCHECK(!role_name_.empty() || ia_role_);
3837 3838
3838 // If we didn't explicitly set the IAccessible2 role, make it the same 3839 // If we didn't explicitly set the IAccessible2 role, make it the same
3839 // as the MSAA role. 3840 // as the MSAA role.
3840 if (!ia2_role_) 3841 if (!ia2_role_)
3841 ia2_role_ = ia_role_; 3842 ia2_role_ = ia_role_;
3842 } 3843 }
3843 3844
3844 } // namespace content 3845 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698