OLD | NEW |
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 3562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3573 role_name_ = html_tag; | 3573 role_name_ = html_tag; |
3574 ia2_role_ = IA2_ROLE_IMAGE_MAP; | 3574 ia2_role_ = IA2_ROLE_IMAGE_MAP; |
3575 ia_state_ |= STATE_SYSTEM_READONLY; | 3575 ia_state_ |= STATE_SYSTEM_READONLY; |
3576 break; | 3576 break; |
3577 case ui::AX_ROLE_IMAGE_MAP_LINK: | 3577 case ui::AX_ROLE_IMAGE_MAP_LINK: |
3578 ia_role_ = ROLE_SYSTEM_LINK; | 3578 ia_role_ = ROLE_SYSTEM_LINK; |
3579 ia_state_ |= STATE_SYSTEM_LINKED; | 3579 ia_state_ |= STATE_SYSTEM_LINKED; |
3580 ia_state_ |= STATE_SYSTEM_READONLY; | 3580 ia_state_ |= STATE_SYSTEM_READONLY; |
3581 break; | 3581 break; |
3582 case ui::AX_ROLE_LABEL_TEXT: | 3582 case ui::AX_ROLE_LABEL_TEXT: |
| 3583 case ui::AX_ROLE_LEGEND: |
3583 ia_role_ = ROLE_SYSTEM_TEXT; | 3584 ia_role_ = ROLE_SYSTEM_TEXT; |
3584 ia2_role_ = IA2_ROLE_LABEL; | 3585 ia2_role_ = IA2_ROLE_LABEL; |
3585 break; | 3586 break; |
3586 case ui::AX_ROLE_SEARCH: | 3587 case ui::AX_ROLE_SEARCH: |
3587 ia_role_ = ROLE_SYSTEM_GROUPING; | 3588 ia_role_ = ROLE_SYSTEM_GROUPING; |
3588 ia2_role_ = IA2_ROLE_SECTION; | 3589 ia2_role_ = IA2_ROLE_SECTION; |
3589 break; | 3590 break; |
3590 case ui::AX_ROLE_LINK: | 3591 case ui::AX_ROLE_LINK: |
3591 ia_role_ = ROLE_SYSTEM_LINK; | 3592 ia_role_ = ROLE_SYSTEM_LINK; |
3592 ia_state_ |= STATE_SYSTEM_LINKED; | 3593 ia_state_ |= STATE_SYSTEM_LINKED; |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3847 // The role should always be set. | 3848 // The role should always be set. |
3848 DCHECK(!role_name_.empty() || ia_role_); | 3849 DCHECK(!role_name_.empty() || ia_role_); |
3849 | 3850 |
3850 // If we didn't explicitly set the IAccessible2 role, make it the same | 3851 // If we didn't explicitly set the IAccessible2 role, make it the same |
3851 // as the MSAA role. | 3852 // as the MSAA role. |
3852 if (!ia2_role_) | 3853 if (!ia2_role_) |
3853 ia2_role_ = ia_role_; | 3854 ia2_role_ = ia_role_; |
3854 } | 3855 } |
3855 | 3856 |
3856 } // namespace content | 3857 } // namespace content |
OLD | NEW |