Repository navigation
Conversation
When a new-password form refused a password before sending it, the error was an alert (or, on the invitation page, a toast) that the password field did not reference: no aria-invalid and no aria-describedby, so returning to the field did not say what was wrong. On the choose-password, password reset and Account settings forms the refused field (the new password for a policy rule, the confirmation for a mismatch) is now marked invalid and described by the error until it changes. The invitation page shows a policy refusal under the password field instead of a toast, and its confirmation field references the mismatch text it already showed. newPasswordFieldProblem returns the reason with the field it is about. Closes Silo-Server#5159 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Resolved: the requested phone-width before-and-after captures have been added with build identifiers, covering the previously missing mobile-web surface. Original requestThe invitation-page captures show the desktop error-state change. Please also add before-and-after captures at a phone-width viewport for that page with the same refused-password case, identifying the builds. CONTRIBUTING.md treats desktop and mobile web as separate surfaces; the current evidence covers desktop only. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…ssword Review follow-up. A mismatch can be corrected from the new-password field, so editing that field now clears the confirmation's error too. A refusal the server names at the new password (body.new_password, or body.password on the reset page) now marks that field as well, as the client-side refusals do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Added phone-width captures (390x844, headless Edge with mobile emulation) of the invitation page with the same refused-password case, before (main 38c3b8c) and after (dcb65cd), next to the desktop pair: https://evidence.siloserver.org/r/silo-server/pr-5453/. The build line in the notes names both commits. |
Review follow-up. Account settings keeps its fields editable while a change is pending, so a refusal that arrives after the new password was edited no longer marks the edited value invalid; the alert still shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
The invitation page now shows a password the server's policy refuses under the password field and marks the field, as the other new-password forms do. It also clears the inline error once the password passes the local check, so a policy refresh can't leave a stale refusal on screen. The new test file's mode drops to 0644 like its neighbours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quick104
left a comment
There was a problem hiding this comment.
Review of 001174d. The other three forms hold up under submit, edit, and server-refusal sequences, and the new tests fail on main for the reported reason. All three findings below are in or next to the invitation page, and each is small. I'm fixing them in a commit on this branch, so there's no need to change anything yourself.
🤖 Claude Code (claude-opus-5-5)
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Review summary (head cbab228)The change does what #5159 asks: on choose-password, reset, Account settings, and the invitation page, a refused new password now marks the field it's about and points the field at the error, and editing clears that state. I pushed one commit (cbab228) for the three findings in my review:
Verification. A sandbox built from the merge base, then rebuilt from cbab228, with the same link invitation. On the base, the password field had no Evidence: https://evidence.siloserver.org/r/silo-server/pr-5453-review/ Recheck on the same head (cbab228). Main hasn't changed any file this PR touches since its merge base. The PR's tests fail on the merge base for the reported reason (8 failed; each failure whose output vitest printed is the missing Left for the maintainers to settle (none block merging):
Validated features. Invitation claim (#1197 C2) runs through the changed page but its outcome is unchanged; nothing else on the board shares code with this diff. User manual. Unaffected: the manual doesn't describe where password refusals appear. Other clients. Web only; Apple, Android, and Roku have their own password screens and this changes no API. Council. Sol (gpt-6.2-sol, medium), Opus (claude-opus-5-5, medium), Gemini (gemini-4-neon, medium). Round 1 on 001174d: 8, 8, 8. Round 2 on cbab228: 9, 9, 9.5. All three found the invitation page's unmarked server refusal; the fix resolved it. The visual review of the invitation page rated the after better than the before (8, 8, 8). Fit: 9/10 · Readiness: 9/10 — ready Fit: an accessibility fix for a triaged bug, done inside the forms with a small helper and no new settings or API. Readiness: shown live on the invitation page and by tests that fail on the base for the other forms, validation board checked, and no open defects in this diff. 🤖 Claude Code (claude-opus-5-5) |
Depends on: none. Merge order: none. Follows #5124 (merged), which added the policy refusals these forms show.
Problem
Closes #5159
Related issue: #5124
Validation tasks: none
Other clients: none. Web only.
When a new-password form refused a password before sending it, the error wasn't tied to the field. Screen readers announced the alert, but the field had no
aria-invalidand noaria-describedbypointing at the error, so moving back to it didn't say what was wrong. This affected the choose-password page (ChoosePassword.tsx), the password reset page (PasswordReset.tsx), Account settings (AccountSettings.tsx), and the invitation page (InviteClaim.tsx), which showed a policy refusal only as a toast. Signup and the admin Create User form already tie their errors to the field.Approach
aria-invalidand described by the existing alert (which now has an id): the new password for a policy rule, the confirmation for a mismatch. That state clears when the field changes; editing the new password also clears a mismatch, since either field can correct it. On Account settings the new-password field keeps its requirements hint inaria-describedby, followed by the error.newPasswordFieldProblem(lib/newPassword.ts) returns the reason together with the field it is about;newPasswordProblemnow uses it and returns the same text as before.role="alert"), and the field references it, as the email field there already does. This replaces the toast. A mismatch still shows its toast on submit; the confirmation field now references the mismatch text the page already showed under it.body.new_password, orbody.passwordon the reset page) marks that field the same way (refusedPasswordMember). On Account settings, whose fields stay editable while a change is pending, it does so only if the field still holds the password that was sent. On the invitation page, avalidation_failedrefusal atbody.passwordshows under the password field like a refusal before sending, and that error clears once the password passes the local check.Validation
ChoosePassword.test.tsx(new file),PasswordReset.test.tsx,AccountSettings.test.tsxandInviteClaim.v2.test.tsx. Each one submits a short password and checks the new-password field is invalid and described by the rule, that changing the field clears it, and (except on the invitation page, where the mismatch shows while typing) that a mismatch marks the confirmation and that editing the new password clears it. ChoosePassword, PasswordReset and Account settings also check a server refusal at the new password marks that field, andInviteClaim.v2.test.tsxchecks the same for the invitation page. All four fail onmainand pass with this change.pnpm exec vitest runon those forms,lib/newPassword, Signup, the admin set-password dialog and the setup wizard: 81 passed.tsc -b --noEmit, eslint and prettier on the changed files: clean.aria-invalid="true",aria-describedby="invite-password-error", and that element reads "Use at least 8 characters."Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-5453/ (before/after screenshots of the invitation page at desktop and phone width)
Invitation page, after submitting a too-short password (desktop 1280x900 and phone 390x844)
Before (main): the rule appears only as a toast, and the password field has no error state.
After: the rule appears under the password field, which is outlined as invalid and references it.
On the other three forms the refused field now also gets the red invalid border that the shared input draws for
aria-invalid; the message itself stays where it was. Their change is shown by the tests, not by captures. Onmain(38c3b8c), with the new tests:With this PR:
Tests 81 passed (81)across the forms above.Risks
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Tie refused new-password errors to their form fields with ARIA attributes
V2ProblemError's first field error points at a given request-body member.aria-invalidandaria-describedby.body.new_password/body.password.Macroscope summarized cbab228.