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

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

Issue 711003003: Map ROLE_SYSTEM_GROUPING to AX role for figure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | content/test/data/accessibility/figcaption-expected-win.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after
3511 case ui::AX_ROLE_EDITABLE_TEXT: 3511 case ui::AX_ROLE_EDITABLE_TEXT:
3512 ia_role_ = ROLE_SYSTEM_TEXT; 3512 ia_role_ = ROLE_SYSTEM_TEXT;
3513 ia2_state_ |= IA2_STATE_SINGLE_LINE; 3513 ia2_state_ |= IA2_STATE_SINGLE_LINE;
3514 ia2_state_ |= IA2_STATE_EDITABLE; 3514 ia2_state_ |= IA2_STATE_EDITABLE;
3515 break; 3515 break;
3516 case ui::AX_ROLE_FIGCAPTION: 3516 case ui::AX_ROLE_FIGCAPTION:
3517 role_name_ = html_tag; 3517 role_name_ = html_tag;
3518 ia2_role_ = IA2_ROLE_CAPTION; 3518 ia2_role_ = IA2_ROLE_CAPTION;
3519 break; 3519 break;
3520 case ui::AX_ROLE_FIGURE: 3520 case ui::AX_ROLE_FIGURE:
3521 role_name_ = html_tag;
3522 ia_role_ = ROLE_SYSTEM_GROUPING; 3521 ia_role_ = ROLE_SYSTEM_GROUPING;
3523 ia2_role_ = IA2_ROLE_SECTION;
3524 break; 3522 break;
3525 case ui::AX_ROLE_FORM: 3523 case ui::AX_ROLE_FORM:
3526 role_name_ = L"form"; 3524 role_name_ = L"form";
3527 ia2_role_ = IA2_ROLE_FORM; 3525 ia2_role_ = IA2_ROLE_FORM;
3528 break; 3526 break;
3529 case ui::AX_ROLE_FOOTER: 3527 case ui::AX_ROLE_FOOTER:
3530 ia_role_ = IA2_ROLE_FOOTER; 3528 ia_role_ = IA2_ROLE_FOOTER;
3531 ia_state_ |= STATE_SYSTEM_READONLY; 3529 ia_state_ |= STATE_SYSTEM_READONLY;
3532 break; 3530 break;
3533 case ui::AX_ROLE_GRID: 3531 case ui::AX_ROLE_GRID:
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
3855 // The role should always be set. 3853 // The role should always be set.
3856 DCHECK(!role_name_.empty() || ia_role_); 3854 DCHECK(!role_name_.empty() || ia_role_);
3857 3855
3858 // If we didn't explicitly set the IAccessible2 role, make it the same 3856 // If we didn't explicitly set the IAccessible2 role, make it the same
3859 // as the MSAA role. 3857 // as the MSAA role.
3860 if (!ia2_role_) 3858 if (!ia2_role_)
3861 ia2_role_ = ia_role_; 3859 ia2_role_ = ia_role_;
3862 } 3860 }
3863 3861
3864 } // namespace content 3862 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/accessibility/figcaption-expected-win.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698