New issue
Advanced search Search tips

Issue 741285 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug
Team-Security-UX
Team-Accessibility

Blocking:
issue 462133



Sign in to add a comment

Permissions bubbles (and other dialogs) have a confusing nesting of a11y roles

Project Member Reported by tapted@chromium.org, Jul 12 2017

Issue description

Chrome Version       : 61.0.3154.4
OS Version: OS X 10.12.5

What steps will reproduce the problem?
1. Navigate around a views bubble/dialog

What is the expected result?

Not having to go VO+Shift+Up/Down to get to all the elements. More meaningful names/announcements without having to enter/exit groups.


What happens instead of that?

Have to. See attached.


Currently views::RootView populates AXNodeData from WidgetDelegate::GetAccessibleWindowRole() (default AX_ROLE_WINDOW) and WidgetDelegate::GetAccessibleWindowTitle() (default: WidgetDelegate::GetWindowTitle())

DialogDelegate overrides GetAccessibleWindowRole():

ui::AXRole DialogDelegate::GetAccessibleWindowRole() const {
  return ui::AX_ROLE_DIALOG;
}


all good so far.

But then DialogDelegate *also* populates AXNodeData:

void DialogDelegateView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
  node_data->SetName(GetWindowTitle());
  node_data->role = ui::AX_ROLE_DIALOG;
}


This sets up a weird dialog-within-a-dialog nesting that's confusing and hard to navigate. It gets worse when some BubbleDialogDelegateViews are also "ALERT" dialogs. So we have an alert dialog within a dialog which is not an alert.


To fix, I think we can just obey DialogDelegate::GetAccessibleWindowRole(). Put that in the RootView and don't give roles to any of the other containers.
 
Screen Shot 2017-07-12 at 2.02.53 pm.png
38.7 KB View Download
Screen Shot 2017-07-12 at 2.03.16 pm.png
61.4 KB View Download
Screen Shot 2017-07-12 at 2.41.14 pm.png
33.8 KB View Download

Comment 1 by tapted@chromium.org, Jul 12 2017

result after https://codereview.chromium.org/2980713002/ attached
fixed.png
28.3 KB View Download
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df3bc2070765d8e38fd47850ad0c112e128e5933

commit df3bc2070765d8e38fd47850ad0c112e128e5933
Author: tapted <tapted@chromium.org>
Date: Wed Jul 12 23:37:35 2017

Views a11y: Obey DialogDelegate::GetAccessibleWindowRole() rather than making a dialog-within-a-dialog

Currently both views::RootView and a dialog's ContentsView() are
populating AX_ROLE_DIALOG. This sets up a weird dialog-within-a-dialog.
Also, since the ContentsView doesn't include the title and dialog
buttons, it creates a nested group that excludes the dialog buttons and
is hard to navigate with a11y tools since it hides the dialog contents
inside the group.

To fix, just rely on views::RootView to populate the window role, and
obey GetAccessibleWindowRole() when deciding whether to notify a11y
tools of the window appearance.

BUG= 741285 

Review-Url: https://codereview.chromium.org/2980713002
Cr-Commit-Position: refs/heads/master@{#486153}

[modify] https://crrev.com/df3bc2070765d8e38fd47850ad0c112e128e5933/chrome/browser/ui/views/conflicting_module_view_win.cc
[modify] https://crrev.com/df3bc2070765d8e38fd47850ad0c112e128e5933/chrome/browser/ui/views/conflicting_module_view_win.h
[modify] https://crrev.com/df3bc2070765d8e38fd47850ad0c112e128e5933/chrome/browser/ui/views/extensions/extension_message_bubble_view_browsertest.cc
[modify] https://crrev.com/df3bc2070765d8e38fd47850ad0c112e128e5933/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc
[modify] https://crrev.com/df3bc2070765d8e38fd47850ad0c112e128e5933/ui/views/bubble/bubble_dialog_delegate.cc
[modify] https://crrev.com/df3bc2070765d8e38fd47850ad0c112e128e5933/ui/views/window/dialog_delegate.cc
[modify] https://crrev.com/df3bc2070765d8e38fd47850ad0c112e128e5933/ui/views/window/dialog_delegate.h

Comment 3 by tapted@chromium.org, Jul 12 2017

Status: Fixed (was: Started)

Sign in to add a comment