Repository navigation
docs(layer-runtime): a closed dialog that renders, for presses and focus - #11894
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 62d600a |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested. The new focus-containment clause describes keyboard behavior that main does not have yet.
- The clause "its focusable content counts for focus containment" (
docs/architecture/layer-runtime.md:132-133) is not true at this head, because the focus trap still treats every control in a closed<dialog>as hidden (packages/core/src/hooks/useFocusTrap.ts:98-109), the record states that it describes the runtime shipped onmain(layer-runtime.md:96-99), and the citedisDisplayedWhileClosedandfocusInClosedDialog.a11y.browser.spec.tsexist only in the open draft #11892, so land #11892 first and rebase (citing the helper inutils/dialogDisplay.ts, whichuseFocusTrap.tsreads), or move the clause into #11892.
The press clause matches the runtime, and an engineering owner has approved the record text for this head. Optional: "its" can read as the layer or as the dialog, so a separate sentence ("Focus containment counts the focusable content of a closed <dialog> that renders.") removes the ambiguity.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (1): Whatever the scope, these are computed over the whole pull request at the issued head; checked: both recipe versions and
docs/architecture/layer-runtime.md, no finding. - Claim: the record said such a layer opens after the next commit. Verified: the record at the base, lines 130-132.
- Claim: the runtime opens a layer that a press opens within the press. Verified:
useLayer.tsx:1854-1879, andsharedResizeObserver.ts:97-100calls back synchronously on registration. - Claim: the record said nothing about focus in such a dialog. Verified: the record at the base.
- Claim: the earlier Layer fix makes a press decide in its own task, in
show(). Verified:useLayer.tsx:1770-1916. - Claim: the focus-trap fix counts a displayed closed dialog's controls through
isDisplayedWhileClosedinuseLayer.tsx. False at this head:useFocusTrap.ts:98-109hides those controls, and the open draft #11892 puts the helper inutils/dialogDisplay.ts. - Claim: the owners wrote both clauses. Not provable from the repository; an engineering owner approved the text for this head.
- Claim: two clauses are added and the rest keeps its meaning. Verified: the diff.
- Claim: a click opens the
Popoverwith its field focused within the click, in Chromium and WebKit. Verified:anchorReadiness.a11y.browser.spec.ts:233-271, whichplaywright.config.ts:94-97runs in both engines. - Claim: Tab and Shift+Tab wrap inside that
Popover, fromfocusInClosedDialog.a11y.browser.spec.ts. False at this head: the file is not in the tree. - Claim: only the record changes, with no runtime, API, visual or policy change. Verified: the diff.
- Claim: the public text holds no internal context. Verified: the added lines, title, description and commit message.
- Claim: rubric R1, the sentence states what the runtime does. False for the focus clause. R2 to R7 report none. Verified: the added lines.
- Claim:
pnpm check:knowledgeand Prettier pass. Verified: rerun at this head. - File
docs/architecture/layer-runtime.md: one blocking finding (the focus clause) and one wording suggestion.
The closed-dialog sentence now says what the runtime does for a press. The decision's commit runs within the press, so the layer opens at once. Any other show() opens after the next commit. It also says that focus containment counts the focusable content of a closed dialog that renders, as the owners decided for the focus-trap fix.
62d600a to
7b4606b
Compare
|
/approve-spec 7b4606b |
There was a problem hiding this comment.
Approved pending CI. CI has not run on this head yet because the pull request is still a draft; it runs once the pull request is marked ready for review.
The earlier requested change is resolved: with #11892 on main, the focus trap counts the controls of a closed <dialog> the page displays (packages/core/src/hooks/useFocusTrap.ts:96), so the new focus sentence states what the runtime does, and the press clause matches packages/core/src/Layer/useLayer.tsx:1844-1868. An engineering owner approved the record text for this head.
Claims and files checked
Review mode: full; reason: rebase
- Claim: the record said such a layer opens after the next commit. Verified: the record on
main,docs/architecture/layer-runtime.md:130-132. - Claim: the runtime opens the layer within the press. Verified:
packages/core/src/Layer/useLayer.tsx:1844-1868andanchorReadiness.a11y.browser.spec.ts:233-271. - Claim: the record said nothing about focus inside such a dialog. Verified: no such sentence on
main. - Claim: #11864 makes a press decide in its own task, in
show(). Verified: merged;useLayer.tsx:1844-1868. - Claim: #11892 makes the focus trap count the controls of a closed dialog that has a box, through
isDisplayedWhileClosedinutils/nodeType.ts. Verified: merged;packages/core/src/utils/nodeType.ts:75-76,useFocusTrap.ts:96. - Claim: the owners decided both points. Verified: an engineering owner's spec approval for this head.
- Claim: the sentence gains a press clause and a separate focus sentence, and the rest keeps its meaning. Verified: the diff.
- Claim: a click in a displayed closed dialog opens the Popover with its field focused within the click, in Chromium and WebKit. Verified:
anchorReadiness.a11y.browser.spec.ts:233-271,playwright.config.ts:93-97. - Claim: Tab and Shift+Tab wrap inside such a Popover, in Chromium and WebKit. Verified:
focusInClosedDialog.a11y.browser.spec.ts:46-77. - Claim: documentation only, with no runtime, API, visual or policy change and no internal context. Verified: one Markdown record changes.
- Claim: the writing rubric results R1 to R7. Verified against the added lines.
- Claim: the knowledge check and Prettier pass at this head, which sits on
mainwith #11892. Verified: both pass. - File
docs/architecture/layer-runtime.md: clear.
|
/approve-spec c80626a |
There was a problem hiding this comment.
Approved pending CI. CI has not run on this head because the pull request is still a draft; it runs once the pull request is marked ready for review.
The merge of main leaves the edited paragraph as it was, and both statements still describe what main does: the press clause matches packages/core/src/Layer/useLayer.tsx:1962-1987, and the focus sentence matches the focus trap's reachability test in packages/core/src/hooks/focusableSelector.ts:78-87. An engineering owner approved the record text for this head.
Claims and files checked
Review mode: full; reason: merge-touches-pr-files
- Claim: the record said such a layer opens after the next commit. Verified: the record on
main,docs/architecture/layer-runtime.md:131-133. - Claim: the runtime opens the layer within the press. Verified:
packages/core/src/Layer/useLayer.tsx:1962-1987andanchorReadiness.a11y.browser.spec.ts:233-271. - Claim: the record said nothing about focus inside such a dialog. Verified: no such sentence on
main. - Claim: #11864 makes a press decide in its own task, in
show(). Verified: merged;useLayer.tsx:1869-2035. - Claim: #11892 makes the focus trap count the controls of a closed dialog that has a box, through
isDisplayedWhileClosedinutils/nodeType.ts. Verified: merged;packages/core/src/utils/nodeType.ts:85-86, used bypackages/core/src/hooks/focusableSelector.ts:85, which the trap calls. - Claim: the owners decided both points. Verified: an engineering owner's spec approval for this head.
- Claim: the sentence gains a press clause and a separate focus sentence, and the rest keeps its meaning. Verified: the diff.
- Claim: a click in a displayed closed dialog opens the Popover with its field focused within the click, in Chromium and WebKit. Verified:
anchorReadiness.a11y.browser.spec.ts:233-271,playwright.config.ts:94-97. - Claim: Tab and Shift+Tab wrap inside that Popover, in Chromium and WebKit. Verified:
focusInClosedDialog.a11y.browser.spec.ts:48-77. - Claim: documentation only, with no runtime, API, visual or policy change and no internal context. Verified: one Markdown record changes.
- Claim: the writing rubric results R1 to R7. Verified against the added lines.
- Claim: the knowledge check and Prettier pass on an earlier commit that sits on
mainwith #11892. Verified: both also pass at this head. - File
docs/architecture/layer-runtime.md: clear.
Reader impact
architecture:layer-runtimesays that a layer anchored in a closed<dialog>that renders opens after the next commit. A reader then expects a layer that a press opens to open late, with its focus after the press. The runtime opens it within the press. The record also says nothing about focus inside such a dialog.Source of truth
show()inuseLayer.tsx).isDisplayedWhileClosedinutils/nodeType.ts).Correction
The closed-dialog sentence gains a clause: a press opens the layer at once. A new sentence follows it: focus containment counts the focusable content of a closed
<dialog>that renders. The rest of the sentence keeps its meaning.Evidence
anchorReadiness.a11y.browser.spec.ts: a click in a displayed closed dialog opens thePopoverwith its field focused within the click, in Chromium and WebKit.focusInClosedDialog.a11y.browser.spec.ts(fix(useFocusTrap): Tab stops inside a closed dialog the page displays #11892): Tab and Shift+Tab wrap inside thatPopover, in Chromium and WebKit.Scope
Components: Layer (record only)
Writing rubric results
R1 narration: none. The sentence states what the runtime does, in the present tense.
R2 research: none in the record.
R3 evidence: no evidence cell changed.
R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: none.
R7 project status: none.
Testing
pnpm check:knowledgeand Prettier pass at 7b4606b, which sits on main with #11892.