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

Unified Diff: chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc

Issue 79273002: Fixed accessibility issues in bookmark bubble dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fixes Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/bookmarks_strings.grdp ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc
diff --git a/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc b/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc
index 43f5c82f475b4a7c59c1916f73fe5ae280316d23..233de2937e04f2d2063586e7147d061cccc62f33 100644
--- a/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc
+++ b/chrome/browser/ui/views/accessibility/accessibility_event_router_views.cc
@@ -174,6 +174,7 @@ void AccessibilityEventRouterViews::DispatchAccessibilityEvent(
switch (state.role) {
case ui::AccessibilityTypes::ROLE_ALERT:
+ case ui::AccessibilityTypes::ROLE_DIALOG:
case ui::AccessibilityTypes::ROLE_WINDOW:
SendWindowNotification(view, type, profile);
break;
@@ -395,9 +396,11 @@ std::string AccessibilityEventRouterViews::GetViewContext(views::View* view) {
// Two cases are handled right now. More could be added in the future
// depending on how the UI evolves.
- // A control in a toolbar should use the toolbar's accessible name
- // as the context.
- if (state.role == ui::AccessibilityTypes::ROLE_TOOLBAR &&
+ // A control inside of alert, toolbar or dialog should use that container's
+ // accessible name.
+ if ((state.role == ui::AccessibilityTypes::ROLE_ALERT ||
+ state.role == ui::AccessibilityTypes::ROLE_DIALOG ||
+ state.role == ui::AccessibilityTypes::ROLE_TOOLBAR) &&
!state.name.empty()) {
return UTF16ToUTF8(state.name);
}
« no previous file with comments | « chrome/app/bookmarks_strings.grdp ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698