Repository navigation
test(MultiSelector): the create-row contract reads the live region's newest message - #8987
Merged
Merged
Conversation
…newest message Since #8244, messages written before the region exposes the previous one are joined in order (spec:AST-086 FR9). Typing several keys in one frame, as pressSequentially can on a fast runner, leaves the previous keystroke's message ahead of the current one, so an exact whole-text match raced. The three live-region checks now assert the newest message. Test only. Original contract by @vjeux in #6829.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Recommended for approval: the three live-region reads now accept the in-order joined update that spec:AST-086 FR9 specifies, and they still fail on an empty region, a wrong newest message, or a message joined after the expected one. Repeated Chromium runs against a Storybook built from this head reproduce the flake with the old exact comparison and show none with the new reads. Nothing further is needed from you.
[Automated review]
3 tasks done
This branch was successfully deployed
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.
Maintainer impact
The release-time accessibility contracts can go red on a correct MultiSelector.
CreateRow.a11y.chromium.spec.tsfails intermittently in CI (it failed two of the last five release checks) with the polite region reading something other than exactlyCreate "Urgent". The empty value in the CI log is the region after its auto-clear: the poll had been reading a longer, joined message until then. A red release check on a healthy commit holds the release.Intended invariant
The contract is unchanged. The live region says
1 resultfor a partial match,Create "Urgent"when the create row is the whole result (not "No results found"), andUrgent createdafter Enter. Highlight handling and the created row's selection are untouched.Change
Since #8244, messages written before the region exposes the previous one are joined, in order, in one update (
spec:AST-086FR9). The test types withpressSequentially, which can send several keystrokes within one frame on a fast runner. The region then reads, for example,Create "Urgen" Create "Urgent": the previous keystroke's message, then the current one. The test compared the whole region text for exact equality, so it passed or failed depending on how many keystrokes fell into a frame.The three live-region checks now assert the region's newest message (it ends the region text after a space, or is the whole text), which is what the current state is. Test only: no product code and no Changeset.
Evidence
All runs were in Chromium against the Storybook built for the failing commit, with Playwright 1.61.1.
Create "Urgen" Create "Urgent"in failing runs, then the 2 s auto-clear to "".Scope
Testing
pnpm exec playwright test packages/core/src/MultiSelector/CreateRow.a11y.chromium.spec.ts --project chromium --repeat-each=40 --fully-parallel, at normal load and under CPU saturation, before and after.prettier --checkandeslinton the file are clean.Credit: @vjeux wrote this contract in #6829. This change only makes its live-region reads robust to typing faster than a frame.
Posted by Cindy's agent on her behalf.