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

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

Issue 692643005: ARIA state/property(aria-relevant,aria-busy) are not exposed correctly on MAC. (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
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 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after
2934 ia2_role_ == IA2_ROLE_CHECK_MENU_ITEM || 2934 ia2_role_ == IA2_ROLE_CHECK_MENU_ITEM ||
2935 ia2_role_ == IA2_ROLE_RADIO_MENU_ITEM || 2935 ia2_role_ == IA2_ROLE_RADIO_MENU_ITEM ||
2936 ia2_role_ == IA2_ROLE_TOGGLE_BUTTON) { 2936 ia2_role_ == IA2_ROLE_TOGGLE_BUTTON) {
2937 ia2_attributes_.push_back(L"checkable:true"); 2937 ia2_attributes_.push_back(L"checkable:true");
2938 } 2938 }
2939 2939
2940 // Expose live region attributes. 2940 // Expose live region attributes.
2941 StringAttributeToIA2(ui::AX_ATTR_LIVE_STATUS, "live"); 2941 StringAttributeToIA2(ui::AX_ATTR_LIVE_STATUS, "live");
2942 StringAttributeToIA2(ui::AX_ATTR_LIVE_RELEVANT, "relevant"); 2942 StringAttributeToIA2(ui::AX_ATTR_LIVE_RELEVANT, "relevant");
2943 BoolAttributeToIA2(ui::AX_ATTR_LIVE_ATOMIC, "atomic"); 2943 BoolAttributeToIA2(ui::AX_ATTR_LIVE_ATOMIC, "atomic");
2944 BoolAttributeToIA2(ui::AX_ATTR_LIVE_BUSY, "busy");
2945 2944
2946 // Expose container live region attributes. 2945 // Expose container live region attributes.
2947 StringAttributeToIA2(ui::AX_ATTR_CONTAINER_LIVE_STATUS, 2946 StringAttributeToIA2(ui::AX_ATTR_CONTAINER_LIVE_STATUS,
2948 "container-live"); 2947 "container-live");
2949 StringAttributeToIA2(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT, 2948 StringAttributeToIA2(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT,
2950 "container-relevant"); 2949 "container-relevant");
2951 BoolAttributeToIA2(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC, 2950 BoolAttributeToIA2(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC,
2952 "container-atomic"); 2951 "container-atomic");
2953 BoolAttributeToIA2(ui::AX_ATTR_CONTAINER_LIVE_BUSY,
2954 "container-busy");
2955 2952
2956 // Expose slider value. 2953 // Expose slider value.
2957 if (ia_role_ == ROLE_SYSTEM_PROGRESSBAR || 2954 if (ia_role_ == ROLE_SYSTEM_PROGRESSBAR ||
2958 ia_role_ == ROLE_SYSTEM_SCROLLBAR || 2955 ia_role_ == ROLE_SYSTEM_SCROLLBAR ||
2959 ia_role_ == ROLE_SYSTEM_SLIDER) { 2956 ia_role_ == ROLE_SYSTEM_SLIDER) {
2960 ia2_attributes_.push_back(L"valuetext:" + GetValueText()); 2957 ia2_attributes_.push_back(L"valuetext:" + GetValueText());
2961 } 2958 }
2962 2959
2963 // Expose table cell index. 2960 // Expose table cell index.
2964 if (ia_role_ == ROLE_SYSTEM_CELL) { 2961 if (ia_role_ == ROLE_SYSTEM_CELL) {
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
3853 // The role should always be set. 3850 // The role should always be set.
3854 DCHECK(!role_name_.empty() || ia_role_); 3851 DCHECK(!role_name_.empty() || ia_role_);
3855 3852
3856 // If we didn't explicitly set the IAccessible2 role, make it the same 3853 // If we didn't explicitly set the IAccessible2 role, make it the same
3857 // as the MSAA role. 3854 // as the MSAA role.
3858 if (!ia2_role_) 3855 if (!ia2_role_)
3859 ia2_role_ = ia_role_; 3856 ia2_role_ = ia_role_;
3860 } 3857 }
3861 3858
3862 } // namespace content 3859 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698