Repository navigation
fix(invitations): keep focus on Accept and Decline while the answer is sent - #131
Merged
Merged
Conversation
…s sent (NFR-IC-19; WCAG 2.4.3) Both buttons were disabled while the request ran, so a refusal left the keyboard at the top of the page and no in-flight state showed. They now use pending, as the ownership offer page does. No text changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…AG 2.4.3) With pending on both, Accept and Decline both went busy for one answer. Only the pressed one is pending now; the other waits, disabled, as on the offer page, and a second answer is refused while one is in flight. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
What
Accept and Decline on an invitation: the pressed button is
pending, the other is disabled, and a second answer is refused while one is in flight.Why
A
disabledbutton that has the focus drops it (WCAG 2.4.3). The ownership offer page already does it this way. No text changes (nopendingLabel).Audit finding UX-5. Class A, size XS.
Seen in the running app (local database, keyboard, 2.5 s of added latency)
main): pressing Decline with Enter made the page body the active element; both buttons weredisabled.aria-busy; Accept is disabled, not busy. When the answer arrives, the statement "Invitation declined." takes focus as before.mainand left alone (UX-43 in the audit): after Accept succeeds, the buttons come back to life until the move to the document finishes, so a slow connection shows a live Accept for a moment.Checks (local, quick only)
tests/unit/invitation-focus.test.ts(3) anddeleted-account.test.ts: 21 passedGate:
quick. The route and its authorisation are untouched.🤖 Generated with Claude Code