Skip to content

a11y/aria-dialog-name: id-less dialogs are reported as bare "dialog", no way to locate them #462

Closed

Description

@deniskern

Summary

a11y/aria-dialog-name reports an unnamed native <dialog> that has no id with the item {"id":"dialog"} only. On a page with several id-less dialogs there is no way to tell which one lacks a name: no selector path, no class, no snippet. A dialog with an id is reported as dialog#<id>, which works. Detection itself is correct on 0.0.103: a dialog named via aria-labelledby or aria-label is not reported. We saw the bare dialog item on a Shopify theme whose drawers are id-less dialogs.

Repro page

<!doctype html><html lang="en"><head><meta charset="utf-8"><title>aria-dialog-name selector repro page</title><meta name="description" content="Minimal repro: three id-less dialogs, one without an accessible name."></head><body><h1>Repro</h1>
<dialog class="cart-drawer" aria-label="Cart"></dialog>
<dialog class="menu-drawer" aria-label="Menu"></dialog>
<dialog class="newsletter-popup"></dialog>
</body></html>
python3 -m http.server 8765
squirrel audit http://localhost:8765/ --http -f json

Actual

"message":"1 native <dialog>(s) without accessible names","items":[{"id":"dialog","sourcePages":[...]}]

Expected

The item identifies the element when it has no id, e.g. dialog.newsletter-popup or a snippet of the opening tag, so a report and a rescan can point at the exact dialog.

Versions

squirrel 0.0.103 (latest), macOS, --http.

Activity

  1. changed the title [-]a11y/aria-dialog-name: items carry only id "dialog", no selector for the unnamed dialog[/-] [+]a11y/aria-dialog-name: id-less dialogs are reported as bare "dialog", no way to locate them[/+] on Oct 5, 2026
  2. self-assigned this
    on Oct 5, 2026
  3. added
    P2
    size: M
    rules
    on Oct 5, 2026
  4. added theissue type on Oct 5, 2026
  5. nc9 commented on Oct 5, 2026

    @nc9
    Contributor

    Let me test this a bit because I think a broader solution may be to include an xpath for machine readable fixes and and possibly assemblng a tag / class name chain for human readable

    Thanks for reporting

  6. nc9 commented on Oct 5, 2026

    @nc9
    Contributor

    ex. from your repro for human view would be something like:

    body -> dialog.newsletter-popup

    like you used in your comment - will just need to work out how to make it distinct enough and knowing which class / elements to select to make it unique.

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

Metadata

Metadata

Assignees

Labels

P2rulessize: M

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions