Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
e41bc52 to
fe0b59c
Compare
|
Real Safari check (iOS simulators, Safari 18.6 and Safari 26.2): with |
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
This change is on hold for a maintainer decision: no current spec says what reset.css does to native control parts, so approval needs a maintainer to provide or identify the governing spec for giving a bare file input's button the bare-button look, including that a disabled one then looks enabled and keeps the arrow cursor. Separately, the Changeset should be a patch ([feat], or [fix] if current visual authority is identified) rather than minor [breaking], because AST-017 FR3 treats an appearance-only change as nonbreaking when the surface's own record is silent (FR54), and that also clears the check:changesets failure. When you rewrite it, naming the disabled-state change and the escape ::file-selector-button { all: revert; }, which restored the browser look in Chromium and Firefox, would help consumers.
[Automated review]
fe0b59c to
ca07a17
Compare
There was a problem hiding this comment.
This change is on hold for a maintainer decision: no current spec says what reset.css does to native control parts, so approval needs a maintainer to provide or identify the governing spec for giving a bare file input's button the bare-button look. That decision should also settle the rule's two consequences: a disabled file input's button then paints like an enabled one, and the button keeps the arrow cursor where a bare <button> gets a pointer. Nothing else needs to change: the patch [feat] Changeset fits an appearance-only change, its escape restores the browser's look, and Astryx's FileInput renders identically.
[Automated review]
ca07a17 to
8efdbbc
Compare
There was a problem hiding this comment.
This change is on hold for a maintainer decision: no current spec says what reset.css does to native control parts, so approval needs a maintainer to provide or identify the governing spec for giving a bare file input's button the bare-button look. That decision should also settle the rule's two consequences: a disabled file input's button then paints like an enabled one, and the button keeps the arrow cursor where a bare <button> gets a pointer. Nothing else in the change needs work: the patch [feat] Changeset fits an appearance-only change, its escape restores the browser's look exactly, and Astryx's FileInput renders identically; the failing pr-a11y step comes from a workflow change that landed on main after this branch's base, so a rebase should clear it.
[Automated review]
`::file-selector-button` is a pseudo-element, so the reset's element selectors never reach it, and a bare file input kept the browser's font stack, button text color, 2px outset border and grey fill beside buttons the reset already turns into plain text. It now gets the reset's box model, font and color inheritance and button reset, in its own rule so that a browser that does not know the pseudo-element drops only that rule; its own padding and margin stay. Astryx's FileInput hides its native input and looks the same. The change alters only appearance, so the changeset is a patch [feat] (spec:AST-017 FR3, DEC-17) that names the old and new look, the disabled state and the escape. No current record governs what reset.css declares. The GitHub Pages landing serves a byte-identical copy of the file, which its test requires to match, so the copy and its manifest hash move with it.
8efdbbc to
c8e039d
Compare
There was a problem hiding this comment.
This change is on hold for a maintainer decision: no current spec says what reset.css does to native control parts, so approval needs a maintainer to provide or identify the governing spec for giving a bare file input's button the bare-button look. That decision should also settle the rule's two consequences: a disabled file input's button then paints like an enabled one, and the button keeps the arrow cursor where a bare <button> gets a pointer. Nothing else in the change needs work: the patch [feat] Changeset fits an appearance-only change, its escape restores the browser's look exactly, and Astryx's FileInput renders identically.
[Automated review]
…#8381) ## User impact **Why:** Keyboard and screen reader users lose their place when a dialog inside an iframe closes: both ways to close it (2 of 2: Escape or a button) send focus to the frame's empty page. **What:** The dialog now returns focus to the control that opened it, with a ring after a key, none after a click. Picture-in-Picture windows were already fine. **How to check:** In the "Dialog in a second document" story, open the frame's dialog and press Escape: focus returns to "Open dialog", with its ring. ## Problem and solution fit What led here: we hit this moving one product onto Astryx, which renders some UI in a second window. Dialog remembers its opener as the page's `document.activeElement`, which for focus inside an iframe is the `<iframe>`. Focusing that `<iframe>` on close moves the frame's focus to its `<body>`. Options: - Follow the page's active element into iframes: misses Picture-in-Picture windows, which the page cannot see into. - Always read the dialog's own document: a page control opening a dialog inside an iframe would lose focus. - Read the dialog's own document while it has focus, else the page's: covers both. Chosen. For the ring, Dialog tracks its own document's input, which the page never hears. Skipping its focus call would change the page, where it hides WebKit's ring after a click. ## Expected behavior and authority `component:Dialog` (current) FR4 and AR2: closing returns focus to the element that opened it. `architecture:interaction-modality` (current) INV1: programmatic focus shows the ring only after keyboard input. Neither is page-only; #7356 fixed this for Popover. ## Smallest restoration - `Dialog.tsx`: record the opener as above, take the entry direction from its window, return focus with its document's modality. - Internal utils: `trackInteractionModalityIn(doc)`, counted so the last mounted Dialog removes its listeners; an optional document for `getInteractionModality`; an optional modality for `focusForLastInput`, which checks text fields against their own window. The page's tracker and other callers are unchanged. No public API, visual or timing change. ## Evidence - Reproduction before the change: main fails the iframe cases in Chromium and WebKit. - Result after the change: every case passes. - Representative unchanged path: the page Dialog passes before and after; the page's modality ignores other documents. - Regression test or other mutation-sensitive proof: the Testing cases, red without the fix. ## Scope - [x] One defect is restored. - [x] Separable contradictory or unsettled tagalongs were removed or split. - [x] No new public API, visual representation, default, or interaction model is hidden under the bug-fix label. - [x] Public text and artifacts contain no internal Meta context. ## Testing - Unit tests (Vitest), 115 files and 3137 tests: Dialog and every other component that returns focus or reads the last input. New cases cover a control inside an iframe, a control in the page, a text field, and the input listeners going away when the last Dialog unmounts. Each new case fails on the code from before the fix it covers. - Browser test in Chromium, 10 cases (`DialogSecondDocument.a11y.browser.spec.ts`): the dialog in the page, an iframe and a Picture-in-Picture window, closed with Escape, with a click, and after a text field opened it, plus a page button that opens a dialog in the iframe. All pass. With the code from before the last review round (0d47027), the iframe and Picture-in-Picture text-field cases fail; with main's `Dialog.tsx`, the iframe cases fail. - The same test in WebKit 26.5: 7 pass, and the 3 Picture-in-Picture cases are skipped, since only Chromium has that window. - CI finds the test by its file name (#8367), and its routing line also covers its story and the two utilities. Locally, `pnpm test:a11y-contract:pr origin/main` picks it and passes 115 browser tests. - Typecheck, repo checks, ESLint and Prettier pass. Merged with our open #7732, #8014 and #7524, typecheck and the utility tests (516) pass; #7525, #7527 and #7529 each merge cleanly with this change.
There was a problem hiding this comment.
Approval waits on a maintainer decision: no current spec says what reset.css does to native control parts, so a maintainer needs to provide or identify the governing spec for giving a bare file input's button the bare-button look, including that a disabled one then paints like an enabled one, loses the browser's press paint, and keeps the arrow cursor where a bare <button> gets a pointer. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Independently, two text fixes are needed:
- Newly live check: the Changeset says the file button now gets "the reset every
<button>gets", but it keeps the arrow cursor where a bare<button>getscursor: pointer(packages/core/src/reset.csslines 263–265), so name what it gets (font, color, border and fill) and say that it keeps the arrow cursor. - Newly live check: the description says no current record governs
reset.css's declarations, butdocs/architecture/theme-compilation.mdlistsreset.cssand its INV19 governs the reset'shtmlfont rule, so say instead that no current record governs what the reset does to native control parts.
The rest checks out: the patch [feat] category fits an appearance-only change, the escape restores the browser's look pixel for pixel, Astryx's FileInput renders identically, and the new browser test fails against the old reset.
Claims and files checked
Review mode: full; reason: recipe-changed (many rules)
- Changeset: the file button gets the reset every bare button gets: false, it keeps the arrow cursor (finding above).
- Changeset: before, it kept the browser's font stack, text color, 2px outset border and grey fill: verified on the old reset in Chromium.
- Changeset: it now inherits the input's font and color with no border or fill, and keeps its padding and margin: verified from computed styles on the new reset.
- Changeset: a disabled file button loses the greyed look, like a disabled bare button: verified.
- Changeset: Astryx's FileInput looks the same because its native input is hidden: verified (identical frames; the input is clipped to 1×1).
- Changeset and description: the revert escape restores the browser's look: verified (pixel-identical frames, enabled and disabled).
- Changeset category: a patch feature fits an appearance-only change with no governing visual record: verified.
- Description: no current record governs the reset's declarations: false, the theme-compilation record governs its html font rule (finding above).
- Description: the before and after screenshots, the disabled state, the arrow cursor, light, dark and right to left: verified in Chromium frames.
- Description: the computed values the browser test compares match a bare button: verified (all 13 match).
- Description: Safari and WebKit results from before a rebase: stated by the author, not rerun.
- Description: the browser test passes on the new reset and fails on the old one: verified in Chromium; it also passed in CI at an earlier head.
- Description: the reset's Chromium contract, unit, until-found and Pages tests and the core typecheck pass: verified (6 contract tests, 20 unit tests, typecheck); the pre-commit checks were not rerun.
- Description: the merge of main resolved only the Pages manifest hash, and the browser test now imports the shared harness that lint requires: verified.
- Description: no Astryx component changes, no API change and no internal context: verified (no API rows, no visible file input in any component, no internal references).
- Description: one product undoes this look today: context, not checkable.
.changeset/reset-file-selector-button.md: finding (cursor claim)..github/pages/assets/manifest.json: clear (the hash matches the stylesheet)..github/pages/assets/reset.css: clear (byte-identical to the package reset).packages/core/src/reset.css: on hold for the owner decision; non-blocking comment-length suggestion.packages/core/src/reset.file-selector-button.a11y.browser.spec.ts: clear (fails against the old reset).packages/core/src/reset.file-selector-button.test.ts: clear.
|
Fixed in 494a49e: the release note names the reset the file button gets and says it keeps the arrow cursor. The description now says no current record governs what the reset does to native control parts. |
There was a problem hiding this comment.
Approval waits on an engineering owner's decision: no current spec says what reset.css does to native control parts, so a maintainer (any engineering owner) needs to provide or identify the governing spec for giving a bare file input's button the bare-button look, including that a disabled one then paints like an enabled one, nothing paints on press, and it keeps the arrow cursor where a bare <button> gets a pointer. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Both text fixes from the last review landed, and nothing else blocks: the patch [feat] category fits an appearance-only change, the escape restores the browser's look pixel for pixel, Astryx's FileInput renders identically, and the new browser test fails against the old reset.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): none.
- Changeset: the file button now gets the font, color, border and fill reset a bare button gets: verified from computed styles on the new reset.
- Changeset: before, it kept the browser's font stack, text color, 2px outset border and grey fill: verified on the old reset in Chromium.
- Changeset: it now inherits the input's font and color with no border or fill, and keeps its padding and margin: verified.
- Changeset: it keeps the arrow cursor where a bare button gets a pointer: verified.
- Changeset: a disabled file button loses the greyed look, like a disabled bare button: verified.
- Changeset: Astryx's FileInput looks the same because its native input is hidden: verified (identical frames, enabled and disabled; the input is clipped to 1×1).
- Changeset and description: the revert escape restores the browser's look: verified (pixel-identical frames, enabled and disabled).
- Changeset category: a patch feature fits an appearance-only change with no governing visual record: verified; the changeset check passes.
- Description: no current record governs what the reset does to native control parts, and the stylesheet record covers only its layer: verified.
- Description: the before and after screenshots, the disabled state, the arrow cursor, light, dark and right to left in Chromium 149: verified in frames from the same engine.
- Description: the computed values the browser test compares match a bare button: verified (the test compares 13, all match).
- Description: the escape brings the measured values back to the old reset's, enabled and disabled: verified.
- Description: WebKit and real Safari results from before a rebase: stated by the author, not rerun.
- Description: the browser test passes on the new reset and fails on the old one: verified in Chromium.
- Description: the reset's Chromium contract (6 tests) and its unit, until-found and Pages tests (20) pass: verified.
- Description: core typecheck passes: verified.
- Description: the pre-commit checks pass: not rerun.
- Description: the merge of main resolved only the Pages manifest hash, the browser test imports the shared harness lint requires, and the last commit rewrote the release note and the rule's comment with the Pages copy and hash: verified.
- Description: no Astryx component changes, no API change and no internal context: verified (no API rows, no visible file input in any component, no internal references).
- Description: one product undoes this look today: context, not checkable.
.changeset/reset-file-selector-button.md: clear..github/pages/assets/manifest.json: clear (the hash matches the stylesheet)..github/pages/assets/reset.css: clear (byte-identical to the package reset).packages/core/src/reset.css: on hold for the owner decision.packages/core/src/reset.file-selector-button.a11y.browser.spec.ts: clear (fails against the old reset).packages/core/src/reset.file-selector-button.test.ts: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision, not on a change to this pull request.
- No current record says what
reset.cssdoes to native control parts, so an engineering owner needs to provide or identify the governing record for giving a bare file input's button the bare-button look, including that a disabled one then paints like an enabled one and that it keeps the arrow cursor where a bare<button>gets a pointer. Any engineering owner records that decision by commenting/approve-spec <full head SHA>on this pull request, and the author may do so as an engineering owner.
Nothing else blocks: every claim in the release note and the description checks out against the code, the patch [feat] category fits an appearance-only change under the release spec's rule for it, the documented escape restores the browser's look pixel for pixel, Astryx's FileInput renders identically because its native input is clipped away, and the new browser check fails against the old reset and passes against this one. The stylesheet's layer still matches the package-stylesheet record, and no published package gains or loses public API.
Claims and files checked
Review mode: full; reason: merge-touches-pr-files
- Release note: the file button now gets the font, color, border and fill reset a bare button gets — verified from computed styles on both resets in Chromium 149.
- Release note: before this, it kept the browser's font stack, button text colour, 2px outset border and grey fill — verified on the base reset.
- Release note: it now inherits the input's font and colour, has no border or fill, and keeps its own padding and margin — verified (6px padding, 4px margin unchanged).
- Release note: it keeps the arrow cursor where a bare button gets a pointer — verified.
- Release note: a disabled file input's button loses the browser's greyed look, as a disabled bare button under the reset already does — verified; both rows now measure identically.
- Release note: Astryx's FileInput looks the same because its native input is visually hidden — verified from its styles, which clip the input to one pixel.
- Release note and description: the revert escape keeps the browser's look — verified; the frame is identical to the base frame, enabled and disabled.
- Changeset category: a patch feature fits an appearance-only change with no governing visual record — verified; the changeset check passes.
- Description: no current record governs what the reset does to native control parts, and the stylesheet record covers only the layer — verified by reading the current records.
- Description: the before and after stills were taken against an older main — verified that main's only later change to the reset is the placeholder's dark-mode colour, which those light stills do not show, so they still describe this revision.
- Description: light, dark and right to left take the input's colour and direction — verified in frames from the same engine.
- Description: the computed values the browser check compares match a bare button — verified; the check compares thirteen and all match, one more than the description claims.
- Description: WebKit and real Safari results from before a rebase — stated by the author, not rerun here.
- Description: the browser check passes on this reset and fails on the old one — verified.
- Description: the reset's Chromium contract and its unit, until-found and Pages tests pass — verified (six browser tests, twenty-one unit tests).
- Description: core typecheck passes — verified.
- Description: the repository checks pass — verified for every check that can run without a version-control index here; three of them shell out to it and could not run.
- Description: pre-commit checks and coverage — not rerun.
- Description: one product undoes this look today — context, not checkable.
.changeset/reset-file-selector-button.md: clear..github/pages/assets/manifest.json: clear; the recorded hash matches the stylesheet..github/pages/assets/reset.css: clear; byte-identical to the package reset.packages/core/src/reset.css: on hold for the owner decision; the rule itself is in the right layer and adds no API.packages/core/src/reset.file-selector-button.a11y.browser.spec.ts: clear; it fails against the old reset.packages/core/src/reset.file-selector-button.test.ts: clear; its first case fails against the old reset.
User impact
Why: anyone showing a native file input under the reset: its button keeps the browser's grey fill, 2px outset border and font beside plain-text
<button>s.What led to it: one product we're moving onto Astryx undoes this itself.
Visual authority
DDrow reused or amended.Design decisionstable by a team design owner.docs/design/.Options and tradeoffs: extend the reset's button rule to
::file-selector-button(this PR; bare file inputs change look). Or keep the browser's look, which clashes with bare buttons. Or style it only inFileInput, which hides its native input, so bare inputs still clash.Why this choice: the reset already makes bare buttons plain text. This reaches the file button, a pseudo-element its selectors miss, enabled and disabled, keeping its padding and margin. Escape:
::file-selector-button { all: revert; }restores the browser's look.Owner decision: whether the reset's button rule reaches the file input's button. No current record governs what the reset does to native control parts (
spec:AST-080covers only its layer), sopatch[feat](spec:AST-017FR3, DEC-17).Before and after
Top row enabled, bottom disabled, each beside a bare
<button>("Upload"), on a page with only the reset.main3e58ae0 against this change at 494a49e. iOS 26.2 Safari (iPhone 17 Pro Simulator), where the bare button falls past the screen's edge:mainChrome 149 (Chrome for Testing):
mainState matrix
<button>; the cursor stays the arrow, as onmain.main's, enabled and disabled.Scope
Testing
How to check: put a file input beside a bare
<button>under the reset: grey and bordered onmain, both plain text here.Evidence:
reset.file-selector-button.a11y.browser.spec.tspasses here and fails withmain'sreset.css(Chromium in CI; WebKit 26.5 locally, before a rebase). The reset's Chromium contract (6 tests), its unit, until-found and Pages tests (21), the pre-commit checks and core typecheck pass.testfrom@astryxdesign/a11y-spec/playwright, as main's lint now requires, and the check passes as before.check:repopass.