Drawer > Accessibility Audit
Refer to the parent epic description for more information on this effort.
Purpose
Audit the accessibility of the GitLab UI Drawer component in all variants and states in order to identify any problems and provide more documentation on the component’s page in Pajamas.
Component description
A drawer presents context-specific information and/or actions without leaving the current page. It's similar to a modal, but at larger breakpoints doesn't block all content or prevent interaction with some page elements.
Initial Methods and Tools
Review the initial testing methods in the parent epic. List the testing methods used for your audit below, including any additional testing methods needed for this component that is not listed in the parent epic.
- Review the Drawer examples in GitLab UI.
- Visual review for contrast and states
- Semantic review to align with WAI-ARIA Authoring Guidelines for a dialog (modal)
- Keyboard only
- Screen reader: VoiceOver + Safari on macOS
- Screen reader: NVDA + Chrome on Windows
- axe DevTools extension in browser
Audit Criteria
Review the general audit criteria in the parent epic. Add applicable criteria to this section, including any additional criteria needed for this component that is not listed in the parent epic. A check indicates that the audit has been performed, not that it passes.
-
All actions and functionality can be done with a keyboard. -
Links, buttons, and controls have a visible focus state. -
All content is presented in text or with a text equivalent. For example, alt text for SVG, or aria-label
for icons that have meaning or perform actions. -
Changes in a component’s state are announced by a screen reader. For example, changing aria-expanded="false"
toaria-expanded="true"
when an accordion is expanded. -
Color combinations have sufficient contrast.
Results
Problem | Solution | Related MR |
---|---|---|
The current drawer implementation that overlays content is effectively a "modal" drawer and should use the same constructs as a modal. | Update the current drawer to align with WAI-ARIA Authoring Guidelines for a dialog (modal). | TBD |
Drawer container uses the <aside> HTML element, but role="dialog" is not permitted on an aside. The dialog role isn't used in the current state, but is part of another recommended update.
|
Use a <div> or <section> element instead. |
TBD |
Focus can be moved to elements hidden by the drawer. | Like a modal, contain focus within the drawer when it's open until the esc key has been pressed or the close button activated. |
TBD |
No state change is announced when activating the button. CleanShot_2022-05-13_at_10.29.55 | Clearly communicate that the drawer is open or closed. | TBD |
Focus doesn't move into the drawer when expanded. Focus doesn't return to the activating button when the drawer is closed. | Like a modal, focus should be placed within the drawer when opened, and returned to the button when closed. | TBD |
Resources
- Modal > Accessibility Audit (&6945)
- axe DevTools report
- Material Design modal drawer example
- Culture Amp modal vs. drawer comparison
Completing the audit
After the solutions have been explored and applied, review the completing the audit section in the parent epic. Complete all items prior to closing this issue.
accessibility ~"Category:FE/UX Foundations" component:drawer