Skip to content

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

@1Copenut

Description

@1Copenut

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)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions