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

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

Issue 702943003: MSAA + (IA,IA2) role are not correctly exposed for html footer tag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updating landmark expectation for win 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/footer-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 3509 matching lines...) Expand 10 before | Expand all | Expand 10 after
3520 case ui::AX_ROLE_FIGURE: 3520 case ui::AX_ROLE_FIGURE:
3521 role_name_ = html_tag; 3521 role_name_ = html_tag;
3522 ia_role_ = ROLE_SYSTEM_GROUPING; 3522 ia_role_ = ROLE_SYSTEM_GROUPING;
3523 ia2_role_ = IA2_ROLE_SECTION; 3523 ia2_role_ = IA2_ROLE_SECTION;
3524 break; 3524 break;
3525 case ui::AX_ROLE_FORM: 3525 case ui::AX_ROLE_FORM:
3526 role_name_ = L"form"; 3526 role_name_ = L"form";
3527 ia2_role_ = IA2_ROLE_FORM; 3527 ia2_role_ = IA2_ROLE_FORM;
3528 break; 3528 break;
3529 case ui::AX_ROLE_FOOTER: 3529 case ui::AX_ROLE_FOOTER:
3530 ia_role_ = IA2_ROLE_FOOTER; 3530 ia_role_ = ROLE_SYSTEM_GROUPING;
3531 ia_state_ |= STATE_SYSTEM_READONLY; 3531 ia2_role_ = IA2_ROLE_FOOTER;
3532 break; 3532 break;
3533 case ui::AX_ROLE_GRID: 3533 case ui::AX_ROLE_GRID:
3534 ia_role_ = ROLE_SYSTEM_TABLE; 3534 ia_role_ = ROLE_SYSTEM_TABLE;
3535 ia_state_ |= STATE_SYSTEM_READONLY; 3535 ia_state_ |= STATE_SYSTEM_READONLY;
3536 break; 3536 break;
3537 case ui::AX_ROLE_GROUP: { 3537 case ui::AX_ROLE_GROUP: {
3538 base::string16 aria_role = GetString16Attribute( 3538 base::string16 aria_role = GetString16Attribute(
3539 ui::AX_ATTR_ROLE); 3539 ui::AX_ATTR_ROLE);
3540 if (aria_role == L"group" || html_tag == L"fieldset") { 3540 if (aria_role == L"group" || html_tag == L"fieldset") {
3541 ia_role_ = ROLE_SYSTEM_GROUPING; 3541 ia_role_ = ROLE_SYSTEM_GROUPING;
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
3855 // The role should always be set. 3855 // The role should always be set.
3856 DCHECK(!role_name_.empty() || ia_role_); 3856 DCHECK(!role_name_.empty() || ia_role_);
3857 3857
3858 // If we didn't explicitly set the IAccessible2 role, make it the same 3858 // If we didn't explicitly set the IAccessible2 role, make it the same
3859 // as the MSAA role. 3859 // as the MSAA role.
3860 if (!ia2_role_) 3860 if (!ia2_role_)
3861 ia2_role_ = ia_role_; 3861 ia2_role_ = ia_role_;
3862 } 3862 }
3863 3863
3864 } // namespace content 3864 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/accessibility/footer-expected-win.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698