test(console-gate): the dialog warnings are the harness, not the components - #508
Merged
Conversation
…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.
This was referenced Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Part of #87
Type of change
revert(Scope): ...)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)insideonMounted. Vue Test Utils mounts into an element that is not in the document, and these specs passportal: false, which keeps the content inside that detached wrapper instead of teleporting it todocument.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:portal: false— as the specs run todayattachTo: document.bodyThis 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 thearia-hiddena browser gives them, and 344 snapshots across 26 files move — well past the dialog family, intoCheckboxGroup,RadioGroup,Switch,Linkand 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
Gate on Node 24:
test318/318 (7468) ·lint0.Generated by Claude Code