Announce help updates through an ARIA live region - #721
Open
DeveloperEmmy wants to merge 6 commits into
Open
Conversation
Introduce a short delay to form announcements and make failure messages explicit. Pass 150ms to useFormAnnouncement so in-progress text is announced after a small debounce, and announce a failure message when requests fail. Improve accessibility of the live region by adding role="status" and aria-atomic="true". Update tests to use fake timers, advance the clock, adjust the live-region selector to target the form, rename the failure test to reflect the new behavior, and add a new test that verifies rapid submissions coalesce into the latest announcement.
Replace repeated button clicks with fireEvent.submit on the form (via getAmountInput().closest('form')!) to more accurately simulate form submissions. Update the assertion to use getByRole('alert') and toHaveTextContent(/must differ/i) so the test verifies the accessible alert region instead of matching plain text. This clarifies intent and improves accessibility-focused test assertions; existing Request ID assertion remains unchanged.
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.
Closes #677
Closes #674
Closes #665
Closes #614
Summary
Related Issue
Type Of Change
Testing
npm run lintnpm testnpm run buildContributor Checklist
type/area-slugwhere possible.Notes For Reviewers
💬 Join the StableRoute Discord for questions, reviews, and faster merges.