Skip to content

test(console-gate): the dialog warnings are the harness, not the components - #508

Merged
IgorShevchik merged 2 commits into
mainfrom
fix/dialog-accessible-name
Aug 29, 2026
Merged

test(console-gate): the dialog warnings are the harness, not the components#508
IgorShevchik merged 2 commits into
mainfrom
fix/dialog-accessible-name

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Linked issue

Part of #87

Type of change

  • Documentation (updates to the documentation or readme)
  • Bug fix (a non-breaking change that fixes an issue)
  • Enhancement (improving an existing functionality)
  • New feature (a non-breaking change that adds functionality)
  • Chore (updates to the build process or auxiliary tools and libraries)
  • Revert (undoing a merged change — retitle this PR revert(Scope): ...)
  • Breaking change (fix or feature that would cause existing functionality to change)

One comment block. No code changes at all.

What this corrects

Sixteen of the console register's 38 entries were annotated as real accessibility defects, "each needing its own fix". They are not. They are an artefact of how the tests mount.

reka-ui checks its own accessibility with document.getElementById(titleId) inside onMounted. Vue Test Utils mounts into an element that is not in the document, and these specs pass portal: false, which keeps the content inside that detached wrapper instead of teleporting it to document.body. The lookup therefore fails while the title sits in the markup the component has just produced — including in the case named, without irony, renders with title correctly.

Measured on Modal, one mount each:

mount warnings
detached, portal: false — as the specs run today 2
attachTo: document.body 0
portal left on 0

This is the second time an annotation in this file has blamed the wrong side; #507 corrected the first. The cost of getting it wrong is not theoretical — two reviewers built recommendations on top of the claim, one calling these a real barrier for screen-reader users and one prioritising the cluster first.

Why the fix is not in this PR

It is one line in componentRender. It is also not small: attaching makes reka-ui's focus scoping actually run, so overlays gain the aria-hidden a browser gives them, and 344 snapshots across 26 files move — well past the dialog family, into CheckboxGroup, RadioGroup, Switch, Link and the editor.

That is a genuine improvement in how faithfully these tests render, and it deserves its own review rather than riding along with a comment fix — particularly since #87 exists because snapshot churn is already hard to review. It also overlaps with #87's other half, which is about the snapshot corpus, so the two are probably one piece of work.

Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Gate on Node 24: test 318/318 (7468) · lint 0.


Generated by Claude Code

claude added 2 commits August 28, 2026 11:50
…onents

Sixteen of the register's entries were annotated as real accessibility defects
"each needing its own fix", on the strength of what the warning says. Tracing
it says otherwise, and this is the second time an annotation in this file has
blamed the wrong side.

reka-ui checks its own accessibility with `document.getElementById(titleId)`
in `onMounted`. Vue Test Utils mounts into an element that is not in the
document, and these specs render with `portal: false`, which keeps the content
inside that detached wrapper rather than teleporting it to `document.body`. So
the lookup fails while the title sits in the markup the component just
produced — including in the case literally named `renders with title
correctly`.

Measured on `Modal`, one mount each: two warnings detached, none with
`attachTo: document.body`, none with the portal left on.

The fix is one line in `componentRender` and it is not small. Attaching makes
reka-ui's focus scoping actually run, so overlays gain the `aria-hidden` a
browser gives them, and 344 snapshots across 26 files move — well past the
dialog family, into `CheckboxGroup`, `RadioGroup`, `Switch`, `Link` and the
editor. That is a real improvement to how faithfully these tests render, and
it is its own change to review, not a footnote to this one.

Recorded here so the next person reads the cause rather than the symptom.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants