fix(console): defects and a11y gaps found while writing the E2E suite - #2206
Merged
Conversation
Behaviour changes:
- trust-center/updates: the create and edit forms validated title and
text but rendered no message, so submitting an incomplete update did
nothing visible
- vendors: an empty name leaked a raw Zod 4 message ('Invalid input:
expected string, received undefined') because the field had no default
- onboarding: the question label pointed at a SelectTrigger with no id,
so clicking it did nothing and screen readers had no association
Accessibility:
- aria-label on five icon-only buttons (trust-center updates and FAQ
edit/delete/reorder) that had no accessible name at all
Test affordances, no behaviour change:
- data-testid on menu triggers and status fields whose only other handle
was a CSS class
- Menu gains an optional triggerTestId prop, inert unless passed
Signed-off-by: papistacoding <bruno.papista@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Row-action triggers, bulk-select checkboxes, column-visibility toggles, status and approval selects, domain-list inputs and several icon-only buttons had no accessible name, so they could only be reached by CSS class or DOM position. Adds aria-label / Label htmlFor / inputLabel so they resolve by role and name. Second batch, disjoint from the set already under review. Signed-off-by: papistacoding <bruno.papista@gmail.com>
Five defects found by the E2E suite, three of them the same shape: a form reset driven by query data, which is correct on first load and destructive on every refetch after it. - create-document.sheet.tsx: an unset standard was sent as standardID: "", which core rejects with a constraint error — so NO trust-center document without a standard could be edited at all, silently, with the dialog closing as if it had saved. Send clearStandard instead, and omit it on create. - create-document.sheet.tsx: the prefill effect keyed on documentData, so any background refetch reset the form and discarded in-progress edits. Prefill once per document id. - profile-name-form.tsx: same reset pattern. On a slow first load the query resolved after the user began typing and wiped the fields; the blanked values then failed min-length validation, so Save did nothing and showed no error. Hydrate once, and never over a dirty form. - tags-card.tsx (procedures): tagValues mirrored the form into local state in an effect keyed on `form`, a stable ref — so it ran once on mount, before the async reset. Tags never rendered on edit. Derive from useWatch instead of keeping a second source of truth. - create-procedure-form.tsx: AuthorityCard received no approver/delegate and the reset omitted approverID/delegateID, so a saved approver always redisplayed as unset. Signed-off-by: papistacoding <bruno.papista@gmail.com>
Extract the control and evidence create-input construction into pure functions so they can be unit tested away from the form, and give the comment, group-member and status controls the accessible names the suite needs to address them. Signed-off-by: papistacoding <bruno.papista@gmail.com>
…ing branch The objectType 'global' -> null correction is also made in the filters PR, which additionally moves this file onto defineFilterFields. Keeping one copy there avoids two PRs claiming the same fix. Signed-off-by: papistacoding <bruno.papista@gmail.com>
This was referenced Aug 29, 2026
golanglemonade
approved these changes
Aug 29, 2026
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.
Defects and a11y gaps I hit while writing the E2E suite. 59 files, but most of that is
aria-label and data-testid additions with no runtime effect. The real changes:
The profile form discarded what you were typing.
form.reset()ran on every changeof
userData, so any background refetch while the form was open threw the in-progressedits away. Guarded with a ref plus
isDirty, so hydration happens once and neverover a dirty form.
Trust center document sheet — prefill ran on every
documentDatachange ratherthan once per document id. Separately,
data.standardID != nullmeant an empty-stringstandard was sent as
standardID: ""instead of clearing the association.Procedure tags went stale. The card mirrored
form.getValues('tags')into localstate from an effect keyed on
form, which never changes identity, so tags setanywhere else never appeared. Derived from
useWatchnow.Trust center updates validated title and text but rendered no message, so
submitting an incomplete update silently did nothing.
Vendors leaked a raw Zod 4 message ("Invalid input: expected string, received
undefined") on an empty name, because the field had no default.
On the a11y side: the onboarding question label pointed at a SelectTrigger with no id,
so clicking it did nothing and screen readers had no association. Clickable divs in the
severity chart and the chip components are real buttons now, so they're
keyboard-reachable. aria-labels on icon-only controls that had no accessible name at
all.
Also pulled the control and evidence input building out into pure functions so the
association-stripping can be tested away from React — two small test files come with
that.