Closed Bug 2031407 Opened 2 months ago Closed 2 months ago

[a11y] Dialog not programmatically identified as modal

Categories

(Core :: Disability Access APIs, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: A02291979, Assigned: julienw)

References

(Blocks 3 open bugs)

Details

(Keywords: access)

Attachments

(1 file)

Steps to reproduce:

Impacted Section/Element

Dashboard, Policy management, Organizational units, Organizational unit: A11y Testing, Event reports, Organizational unit: A11y Testing: Policy management, and User: Peter Magyari pages

Steps to Reproduce

On the Dashboard page, open DevTools. Activate any of the "View Event Details" buttons. Inspect the "Event Details" dialog container. On the Policy management and Organizational unit: A11y Testing: Policy management pages, open DevTools. Activate the "Bookmarks" accordion control button. In the resulting disclosure, navigate to the "DisplayBookmarksToolbar Edit policy" button and activate it to open the Edit policy (for Bookmarks > DisplayBookmarksToolbar) dialog. Inspect the dialog container. On the Organizational units page, open DevTools. Activate the "Add organizational unit" button. Inspect the "Create a new organizational unit" dialog container. On the Organizational unit: A11y Testing page, open DevTools. Activate the "Rename" button. Inspect the "Rename organizational unit" dialog container. On the Organizational unit: A11y Testing page, open DevTools. Activate the "Select all members" checkbox. Activate the "Bulk actions" button. Activate the "Move members" button. Inspect the "Move members" dialog container. On the Organizational unit: A11y Testing page, open DevTools. Activate the "Delete" button. Inspect the "Delete organizational unit" dialog container. On the Event reports page, open DevTools. Activate any of the "View Event Details" buttons. Inspect the "Event Details" dialog container. On the User: Peter Magyari page, open DevTools. Activate the "Deactivate user" button. Inspect the "Confirm deactivation" dialog container. On the User: Peter Magyari page, open DevTools. Activate the "Status info" button or the "Status definitions" button. Inspect the "Status definitions" dialog container.

Actual results:

Dialog container lacks the aria-modal attribute.

Expected results:

Dialog container has aria-modal="true".

User Impact

Semantic information diluted.

WCAG 2.2 References

Best practice only. While aria-modal="true" adds semantic information, its absence does not constitute a WCAG failure provided the dialog itself is properly implemented and announced.

Recommendations

Apply aria-modal="true" to the dialog container. This is the clearest, least fragile way to convey "this is modal" to screen readers.

Testing Environment

Any

Assistive Technology Used

Any

Further Reference

Severity

4-Recommendation

Given I'm using <dialog> with the showModal native API, does using aria-modal="true" bring something more to the user? Have you seen issues with screen readers?

Thank you

Accessibility Severity: --- → s4

See previous comment

Flags: needinfo?(A02291979)

Though when I look at the states in the accessibility panel, modal doesn't appear unless I add aria-modal="true". I wonder if that's a bug in Firefox?

Morgan, would you be the right person to look at this?

You can test easily with this example

According to its accessibility dev tool, Chrome seems to add modal: true on this dialog.

Flags: needinfo?(mreschenberg)

adding distilled testcase: data:text/html,<button onclick="document.getElementById('dialog1').showModal()">Show HTML dialog with showModal</button><dialog id="dialog1">I am a dialog. Am I modal?</dialog><button onclick="document.getElementById('dialog2').showModal()">Show HTML dialog with aria-modal</button><dialog id="dialog2" aria-modal="true">And I am explicitly modal dialog</dialog>

.showModal() method does not add to Fx A11y tree a modal state for the dialog

Yes, this is an accessibility engine bug. This is covered by this part of the HTML AAM spec.

Severity: -- → S4
Status: UNCONFIRMED → NEW
Accessibility Severity: s4 → ---
Component: Console → Disability Access APIs
Depends on: 1893707
Ever confirmed: true
Flags: needinfo?(mreschenberg)
Flags: needinfo?(A02291979)
Product: Firefox Enterprise → Core
No longer depends on: 1893707

I had a look whether I could fix that with the help of an LLM, please tell me if that's a disturbance.

Pushed to try: https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=36580
(update: I fixed the reported eslint issue ^)

Assignee: nobody → felash
Status: NEW → ASSIGNED
Attachment #9570968 - Attachment description: WIP: Bug 2031407 - Expose the 'modal' attribute to the accessibility tree r=jamie → Bug 2031407 - Expose the 'modal' attribute to the accessibility tree r=jamie
Attachment #9570968 - Attachment description: Bug 2031407 - Expose the 'modal' attribute to the accessibility tree r=jamie → Bug 2031407 - Expose the 'modal' attribute of a modal <dialog> to the accessibility tree r=jamie
Attachment #9570968 - Attachment description: Bug 2031407 - Expose the 'modal' attribute of a modal <dialog> to the accessibility tree r=jamie → Bug 2031407 - Expose the 'modal' attribute to the accessibility tree r=jamie
Attachment #9570968 - Attachment description: Bug 2031407 - Expose the 'modal' attribute to the accessibility tree r=jamie → Bug 2031407 - Expose the 'modal' attribute of a modal <dialog> to the accessibility tree r=jamie
Pushed by jwajsberg@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/508119c7bfb8 https://hg.mozilla.org/integration/autoland/rev/aebc59b16b42 Expose the 'modal' attribute of a modal <dialog> to the accessibility tree r=Jamie
Regressions: 2033730
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
QA Whiteboard: [qa-triage-done-c153/b152]

Resolved.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: