Skip to content

a11y/table-duplicate-name: closed-dialog tables counted as simultaneously exposed #1637

Closed

Description

@deniskern

Summary: .173 warns on /tables-hidden, whose one exposed table is named Content and two Size tables are in distinct closed native dialogs. Minimal HTML: <table aria-label="Content"><tr><td>Main</td></tr></table><dialog><table aria-label="Size"><tr><td>A</td></tr></table></dialog><dialog><table aria-label="Size"><tr><td>B</td></tr></table></dialog>. Actual: one duplicate size name (two tables); expected: exclude closed/inert descendants from current exposed uniqueness or mark unresolved state explicitly, and recheck the relevant opened state. Control /tables-visible has two exposed Size tables and must still warn. Tagged source selects all data tables without static-visibility filtering.

Triage

a11y/table-duplicate-name (packages/rules/src/a11y/table-duplicate-name.ts) selects every table that is not role=presentation or role=none and groups them by accessible name. It applies no visibility filter, so tables inside a closed <dialog> (or hidden, inert, display:none ancestors) count as exposed. Confirmed against the minimal HTML in the report.

Acceptance Criteria

  • Tables inside a closed <dialog> are not counted as exposed when checking for duplicate names
  • Tables under a hidden, inert or inline display:none ancestor are excluded the same way
  • The /tables-hidden case (one exposed "Content" table, two "Size" tables in separate closed dialogs) passes
  • The /tables-visible control (two exposed "Size" tables) still warns
  • Excluded tables are surfaced as a diagnostic or an explicit unresolved state, not silently dropped
  • Unit tests cover the closed dialog, hidden and visible cases

Generated by Claude Code

Activity

  1. added
    bug
    rules
    size: S
    on Nov 8, 2026
  2. added theissue type on Nov 8, 2026
  3. added 2 commits that reference this issue on Nov 8, 2026
    098c1aa
    ae31851
  4. added a commit that references this issue on Nov 9, 2026
    7ca2218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions