Upgrade ui components to meet minimum accessibility standards #238
Replies: 7 comments 18 replies
-
I was wondering if it made sense for us to include Modal in the list or is it perhaps that Modal isnt reaching the minimun requirements? In our modal we can use tab to navigate which is already a good starting point. Few more things that could make it even more accessible is the following:
Let me know your thoughts. |
Beta Was this translation helpful? Give feedback.
-
Great overview @cooper-joe ! Regarding the TabBar / Tabs, we discussed removing the tabstop from individual tabs (the tabbar itself has a single tabstop) and supporting left/right arrowkey navigation between tabs - this allows the user to tab into the contents of the tab pane after selecting the tab they want. See #223 |
Beta Was this translation helpful? Give feedback.
-
I would like to add to the minimum: we should allow adding |
Beta Was this translation helpful? Give feedback.
-
I propose another addition to the minimum standard:
|
Beta Was this translation helpful? Give feedback.
-
I find point 2. from the top comment a bit hard to contribute to without further research. I didn't realize for example that our switch is not necessarily accessible if you use it without a label (like we do in the scheduler). There is a standard (https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) that provides guidelines on providing an invisible labels where a visible label cannot be used, but the switch needs to be updated to fit that standard (we need to use an I suspect that there are a ton of issues like this in ui, that we currently don't know about. So maybe we could define the goal as: update our tests to use https://testing-library.com/docs/cypress-testing-library (and related libs), and update components where they don't allow for usage with the selectors from that lib? That should already take care of a fair amount of accessibility issues I suspect, and is still a fairly concrete goal. Or maybe we could use the above as a follow up goal. |
Beta Was this translation helpful? Give feedback.
-
One other big accessibility issue that I had almost forgotten about: using buttons as links (so a button that calls history.push on click). See this article: https://www.webaxe.org/proper-use-buttons-links. Quite bad for accessibility. We should be using an However, it's tricky to resolve that from an app, as you can't easily apply the button styles from ui to a react router Link. On the other hand, from ui, you can't easily export a styled react router link. So that's why this hasn't been solved yet (unless I'm missing something). So worth looking into. |
Beta Was this translation helpful? Give feedback.
-
Maybe a good example for us is this accessible react component lib: https://reach.tech. |
Beta Was this translation helpful? Give feedback.
-
This topic is based on a discussion in the 17/02/21 frontend initiatives meeting regarding accessibility (a11y) in the
ui
library. There was general agreement thatui
should meet some minimum standards for a11y.This proposal suggests the following order of work:
ui
core
components that do not meet our defined a11y minimum standard. (Covered in this document).ui
core
components to meet minimum standards.ui
widget
and other components that do not meet a11y minimum standard.1. a11y minimum standard
I propose defining the minimum standard (derived from relevant WCAG AA points) as:
role
attribute2.
core
components not meeting minimum standardThe following
core
ui
components do not meet the minimum standard:Chip
General
chip
. Achip
is an interactive element, it should be possible to focus and activate via keyboard.Type:
removeable
chip
has an extra interactive element used to trigger the remove action. It should be possible to focus and activate this action via keyboard.MenuItem/Menu
MenuItem
insideMenu
.MenuItem
is an interactive element, it should be possible to focus and activate via keyboard.Tab/TabBar
Scrolling tabs
TabBar
has buttons to scroll theTabBar
left and right. It is not possible to tab to these buttons or activate them via keyboard. These buttons are interactive elements and it should be possible to focus and activate via keyboard.Tooltip
Tooltip
via keyboard. ATooltip
trigger is technically an interactive element.Tooltip
s currently display on hover only. Ideally,Toolip
s applied to an focusable element should be displayed when said element has focus.AlertBar
AlertBar
is an interactive element, and should therefore be possible to focus and activate via keyboard. I am unsure how theAlertStack
will interact with the page contenttabOrder
, so this may be an exception to the standard.SingleSelect
Modal
See #247
Beta Was this translation helpful? Give feedback.
All reactions