"Personalize" drawer does not operate well with a screen reader
Categories
(Firefox :: New Tab Page, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: eeejay, Assigned: eeejay)
References
(Blocks 1 open bug)
Details
(Keywords: access)
Attachments
(5 files, 1 obsolete file)
There are several issues with the personalize drawer in its current implementation. This may be a meta bug, or addressed all directly here.
- Keyboard activating the "Personalized" button should move keyboard focus to something focusable in the dialog. Arguably the "Close" button since it is the first focusable element in the dialog.
- The drawer should have a role, probably "dialog" or a landmark role with a title. The title should probably be "personalize". This tells the user when it appears what appeared.
- The switch/checkbuttons appear semantically before their associated headers. They should follow them.
- The switch checkboxes are implemented with a known label > checkbox css hack that makes the actual checkbox transparent and small. This makes it a hard touch target for screen readers and doesn't allow users who rely on the reported bounds of the widget to discover it. Ideally, the checkbox should have the same bounds as the visible switch (ie the label).
Assignee | ||
Comment 1•4 years ago
|
||
In addition to #1, when the dialog is closed focus is not restored in the main page.
Assignee | ||
Comment 2•4 years ago
|
||
To help prioritize it is worth understanding the user current screen reader user experience:
- A user tabs or moves the screen reader cursor to the personalize button and activates it.
- Nothing happens.
- If the user would tab/cursor forward they will discover that there is now a new "close" button followed by other controls that weren't there before. There is no context to what the close button actually does (does it close the tab?). There is no context to what the following controls do, unless the user remembers that they pressed a button earlier that didn't seem to do anything.
- The user activates the "Close" button.
- Nothing happens.
- The user tabs or cursors forward and now they are inexplicably in the top-sites section, when earlier there were other controls there.
This can be fixed in three steps:
- Add a label "Personalize" and a role of "dialog" to
.customize-menu
. - After drawer appears, call focus() on close button.
- After drawer goes away, call focus() on "Personalize" button.
With those fixes, a screen reader user will get all the context they need for the drawer:
- A user tabs or moves the screen reader cursor to the personalize button and activates it.
- The user hears "'Personalize' dialog, 'Close' button". They now know they successfully opened a "Personalize" dialog and they are focused on its close button.
- If the user would tab/cursor forward they will encounter controls with the knowledge that those are customization settings for the new tab.
- If the user navigates past the last item in the dialog to the top sites section, the screen reader will tell them that they left the dialog.
- When the user finally navigates to and activates the "Close" button, the screen reader will tell them that the dialog has been closed and they are back where they started on the "Personalize" button.
Assignee | ||
Comment 3•4 years ago
|
||
tl;dr
The focus management and dialog role are essential for basic screen reader support, the other items can be done in an improvements round.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
I prioritized this as access-s2, and spun out issues #3 and #4 as bug 1708258 and bug 1708259 respectively with an access-s3 severity.
Assignee | ||
Comment 5•4 years ago
|
||
This patch does 3 things:
- Adds a label "Personalize" and a role of "dialog" to .customize-menu.
- After drawer appears, calls focus() on close button.
- When drawer is visible, explicitly hide obscured Personalize button.
- After drawer goes away, calls focus() on "Personalize" button.
I tried to keep this simple and minimal, but two things made this more
involved:
- The component heirarchy didn't make it easy to alternate focus
between two buttons that aren't in the same component. - The CSS transition requires waiting for the close button to become
visible.
I took the liberty to clean up the CSS a bit. There is no need to have
special exceptions for how visibility
is animated. Since this is a
binary property it becomes invisible at the end of a transition
duration, and visible at the begining.
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
This will allow us to encapsulate focus control for the menu's open and
close buttons.
Assignee | ||
Comment 7•4 years ago
|
||
Depends on D113865
Assignee | ||
Comment 8•4 years ago
|
||
The timeout
for the CSSTransition needs to match the actual duration
of the CSS transition. This is needed because the close button needs to
be visible before focus() is called on it or else it won't recieve
focus.
Depends on D113866
Assignee | ||
Comment 9•4 years ago
|
||
When the menu is showing the personalize button is obscured, yet
keyboard users can still tab to it. This can be confusing.
I made the transition timeout 50ms longer than the menu transition
because I didn't want it to go away when it was focused before the
close button was focused. This can cause a brief confusion.
Depends on D113867
Assignee | ||
Comment 10•4 years ago
|
||
I took the liberty to clean up the CSS a bit. There is no need to have
special exceptions for how visibility
is animated. Since this is a
binary property it becomes invisible at the end of a transition
duration, and visible at the begining.
Depends on D113868
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1f3d0ce673ad
https://hg.mozilla.org/mozilla-central/rev/b9b8ce074ff0
https://hg.mozilla.org/mozilla-central/rev/a223e40d5d16
https://hg.mozilla.org/mozilla-central/rev/67a3193e6286
https://hg.mozilla.org/mozilla-central/rev/285861b32934
Updated•2 years ago
|
Description
•