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

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 3409 matching lines...) Expand 10 before | Expand all | Expand 10 after
3420 ia_role_ = ROLE_SYSTEM_GRAPHIC; 3420 ia_role_ = ROLE_SYSTEM_GRAPHIC;
3421 } 3421 }
3422 break; 3422 break;
3423 case ui::AX_ROLE_CELL: 3423 case ui::AX_ROLE_CELL:
3424 ia_role_ = ROLE_SYSTEM_CELL; 3424 ia_role_ = ROLE_SYSTEM_CELL;
3425 break; 3425 break;
3426 case ui::AX_ROLE_CHECK_BOX: 3426 case ui::AX_ROLE_CHECK_BOX:
3427 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; 3427 ia_role_ = ROLE_SYSTEM_CHECKBUTTON;
3428 ia2_state_ |= IA2_STATE_CHECKABLE; 3428 ia2_state_ |= IA2_STATE_CHECKABLE;
3429 break; 3429 break;
3430 case ui::AX_ROLE_CHECK_BOX_MENU_ITEM:
3431 ia_role_ = ROLE_SYSTEM_CHECKBUTTON;
3432 ia2_role_ = IA2_ROLE_CHECK_MENU_ITEM;
3433 ia2_state_ |= IA2_STATE_CHECKABLE;
3434 break;
3430 case ui::AX_ROLE_COLOR_WELL: 3435 case ui::AX_ROLE_COLOR_WELL:
3431 ia_role_ = ROLE_SYSTEM_CLIENT; 3436 ia_role_ = ROLE_SYSTEM_CLIENT;
3432 ia2_role_ = IA2_ROLE_COLOR_CHOOSER; 3437 ia2_role_ = IA2_ROLE_COLOR_CHOOSER;
3433 break; 3438 break;
3434 case ui::AX_ROLE_COLUMN: 3439 case ui::AX_ROLE_COLUMN:
3435 ia_role_ = ROLE_SYSTEM_COLUMN; 3440 ia_role_ = ROLE_SYSTEM_COLUMN;
3436 ia_state_ |= STATE_SYSTEM_READONLY; 3441 ia_state_ |= STATE_SYSTEM_READONLY;
3437 break; 3442 break;
3438 case ui::AX_ROLE_COLUMN_HEADER: 3443 case ui::AX_ROLE_COLUMN_HEADER:
3439 ia_role_ = ROLE_SYSTEM_COLUMNHEADER; 3444 ia_role_ = ROLE_SYSTEM_COLUMNHEADER;
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
3835 // The role should always be set. 3840 // The role should always be set.
3836 DCHECK(!role_name_.empty() || ia_role_); 3841 DCHECK(!role_name_.empty() || ia_role_);
3837 3842
3838 // If we didn't explicitly set the IAccessible2 role, make it the same 3843 // If we didn't explicitly set the IAccessible2 role, make it the same
3839 // as the MSAA role. 3844 // as the MSAA role.
3840 if (!ia2_role_) 3845 if (!ia2_role_)
3841 ia2_role_ = ia_role_; 3846 ia2_role_ = ia_role_;
3842 } 3847 }
3843 3848
3844 } // namespace content 3849 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698