-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
accessibilityWCAG supportWCAG support
Description
Is this something you or your team is interested in contributing a pull request towards?
Yes
Expected Behavior
Layer component with modal set to true should conform to accessibility guidelines.
Actual Behavior
The following console error is displayed when opening the modal:
Blocked aria-hidden on an element because its descendant retained focus. The focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at https://w3c.github.io/aria/#aria-hidden.
Element with focus: a
Ancestor with aria-hidden: <a tabindex="-1" aria-hidden="true" class="LayerContainer__HiddenAnchor-sc-1srj14c-0 kwDYmk"></a>
It seems an ancestor of the hidden layer anchor is also set with aria-hidden="true"
, causing the error.
URL, screen shot, or Codepen exhibiting the issue
Steps to Reproduce
- go to https://v2.grommet.io/layer
- Open dev tools console
- click the "Show" button.
Your Environment
- Grommet version: 2 - whatever's on the component playground at https://v2.grommet.io/layer
- Browser Name and version: Chrome Version 131.0.6778.109
- Operating System and version (desktop or mobile): Mac OS 14.7.1 desktop
Metadata
Metadata
Assignees
Labels
accessibilityWCAG supportWCAG support