Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiModal][SCREEN READER]: Revisit adding role and aria-modal attributes to component #7563

Closed
1Copenut opened this issue Mar 7, 2024 · 1 comment · Fixed by #7564
Closed

Comments

@1Copenut
Copy link
Contributor

1Copenut commented Mar 7, 2024

Description

The EUI team had previously discussed adding role="dialog" and aria-modal="true" attributes to the EuiModal container, but the issue was closed around March 2023 without going forward.

I would like to revisit this and re-test our modal component with these attributes applied. Specifically I'll be testing for improved or regressed screen reader UX in announcing the modal.

Proposed solution

! https://github.com/elastic/eui/blob/5cc4ce8d232e2f0295255724727be16ea3394198/src/components/modal/modal.tsx#L90

<div
  css={cssStyles}
  className={classes}
  onKeyDown={onKeyDown}
  tabIndex={0}
  style={newStyle}
+ role="dialog"
+ aria-modal="true"
  {...rest}
>

WCAG or Vendor Guidance (optional)

@cee-chen
Copy link
Contributor

cee-chen commented Mar 7, 2024

Dropping this link in here as a resource: https://hidde.blog/dialog-modal-popover-differences/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants