openedx / openedx/paragon

a11y: ModalDialog does not set aria-modal="true" on the dialog element

Open Beginner friendly
#4,402 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
140
Forks
100
Avg merge
1h 3m
Merged PRs (30d)
30

Description

Context

Found during the 2026 Axim-commissioned accessibility audit of Paragon, while documenting ModalDialog against the APG modal dialog pattern.

Current behavior

ModalDialog renders the dialog container with role="dialog" and aria-label={title} (ModalDialog.tsx), and ModalLayer enforces focus containment behaviorally via react-focus-on. However, aria-modal="true" is not set.

Impact

Some screen readers use aria-modal to scope reading/browse commands to the dialog and treat background content as inert. Without it, users may be able to read (though not focus) background content while the dialog is open, contrary to the modal's intent. WCAG mapping: 4.1.2 Name, Role, Value (state not fully exposed).

Suggested fix

Add aria-modal="true" to the role="dialog" element in ModalDialog.tsx. Verify the derived modals (AlertModal, FullscreenModal, MarketingModal) inherit it, and confirm no double-inert conflict with the react-focus-on aria-hidden handling.

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Modal/ModalDialog.tsx at the role="dialog" element, then inspect the derived AlertModal, FullscreenModal, and MarketingModal components. Check how react-focus-on applies aria-hidden behavior. Done means the dialog exposes aria-modal="true", derived modals inherit it, and there is no double-inert conflict.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.