Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.
This repository was archived by the owner on May 24, 2024. It is now read-only.

Modal Dialog does not conform to WAI-ARIA accessibility guidelines #62

Open
@jmahurin

Description

@jmahurin

Bug Report

Description

ACCESSIBILITY ISSUE WITH MODAL DIALOG

The modal focus should wrap focusable elements when the user presses the tab key. A modal should give the first element focus and as the user tabs through the elements, each succeeding element in the logical flow should receive focus. When the last element is reached, pressing the tab key should wrap the focus to the first element.

The Terra ModalManager does not behave in the way as specified by the W3C WAI-ARIA guidelines and recommendations. For more information on modal practices see: https://www.w3.org/TR/wai-aria-practices-1.1/#dialog_modal

The above link has a demo on how the modal dialog box is expected to work to make it more accessible. This is a somewhat of a barrier for keyboard-only and sight challenged users. For example, a non-sighted user will not know when he/she has reached the last button. Hitting tab will throw them off of the page and they have to find their way back to where they were.

Steps to Reproduce

  1. Open the link: https://engineering.cerner.com/terra-ui/components/terra-modal-manager/modal-manager/about
  2. Click on the Disclose (default) button
  3. Use the tab key to move the focus to the various elements
  4. At this time, the last focusable element is a text field. Hit tab again and the focus jumps out off the page and to the browser's address bar

Additional Context / Screenshots

From the following link, click on the Add Delivery Address button for the W3C example of how a modal dialog box should work.
https://www.w3.org/TR/wai-aria-practices-1.1/#dialog_modal

Expected Behavior

The focus should wrap when a user reaches the last focusable element and move to the first when the tab key is pressed.

Possible Solution

Remediate the modal dialog box to comply with W3C recommendations.

Environment

  • Component Name and Version:
  • Browser Name and Version:
  • Node/npm Version: [e.g. Node 8/npm 5]
  • Webpack Version:
  • Operating System and version (desktop or mobile):

@ Mentions

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions