Skip to content

fix(ui): name searchable select popover controls - #4178

Merged
yannickmonney merged 3 commits into
mainfrom
fix/searchable-select-accessible-names
Oct 4, 2026
Merged

yannickmonney merged 3 commits into
mainfrom
fix/searchable-select-accessible-names

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Change

Name SearchableSelect's open search input, listbox and popover at the shared
component, without changing any platform callers or keyboard/layout behavior.

  • Preserve explicit searchPlaceholder and aria-label names.
  • Fall back to the field label; reference ReactNode labels by ID.
  • Name placeholder-only pickers' lists too, and use the existing localized
    common.search.placeholder as a last resort when no naming props are supplied.
  • Treat blank explicit names as absent. Keep the visible placeholder optional.
  • Document the naming contract and the manual register's component-only coverage.

Closes #4059

Finding → test map

Finding Regression
Project / Competence label-only pickers focus an unnamed input Label-only default-trigger cases assert search/list/popover accessible names and focused search; WCAG 2.1 A/AA jsdom axe scans the open popover
aria-label-only callers leave search unnamed Recipients case names all three surfaces
Existing Agent type control must stay clean Distinct explicit search and picker names are retained; open popover axe remains clean
Other naming configurations must not regress Placeholder-only, label + placeholder, rich label and blank explicit-name cases assert names and pass axe
Unnamed callers must not open unnamed controls EN/DE/FR tests assert the existing localized Search fallback
Focus and keyboard interaction must remain intact Label-only regressions select by keyboard, close, and restore trigger focus; existing navigation/filtering tests remain green

Verification

Base: 7063f99746732903e1a326ca17fee8e91bf0c3a4 (fresh origin/main).

Failing-before (new tests against unchanged component):

Test Files  1 failed (1)
Tests       2 failed | 54 passed (56)
Expected accessible name: Project / Competence
Received: empty

Passing-after:

@tale/ui SearchableSelect: 65 passed (65)
Platform routing-policy editor + assignee picker: 27 passed (27)
UI docs navigation + links + loader: 19 passed (19)
Scoped TypeScript check: passed
Changed-file type-aware oxlint: exit 0
Pinned oxfmt check: passed
Manual lint: 5 trees / 1438 boxes, passed
git diff --check: passed

Commands (single worker per targeted Vitest run; Node 24 on PATH):

  • cd packages/ui && bunx vitest run --project unit --maxWorkers 1 src/components/forms/searchable-select.test.tsx
  • cd services/platform && bunx vitest run --project client --maxWorkers 1 app/features/settings/governance/components/conversation-routing-policy-editor.test.tsx app/features/conversations/components/conversation-assignee-picker.test.tsx
  • cd services/ui-docs && bunx vitest run --project node --maxWorkers 1 tests/navigation.test.ts tests/links.test.ts tests/loader.test.ts
  • cd packages/ui && bunx oxlint --type-aware src/components/forms/searchable-select.tsx src/components/forms/searchable-select.test.tsx
  • bunx oxfmt --check <four changed files>
  • bun ../scoped-typecheck.ts packages/ui/tsconfig.json packages/ui/src/components/forms/searchable-select.tsx packages/ui/src/components/forms/searchable-select.test.tsx packages/ui/tests/setup.ts (retained delivery script loads the workspace options and limits root files to these files plus ambient declarations)
  • bun tools/lint-manual/cli.ts

Limits / handoff

The fleet dispatch prohibits local backend stacks, browsers, E2E and builds while
both heavy permits are held. No real-browser chat hand-over / competence dialog
flow, screen reader, or visual-aspect-analyzer run is claimed. The component
regressions cover their prop shapes with jsdom axe, not full platform flows or
real layout/contrast. Independent review should verify those remaining browser
acceptance checks when a permit is available. No self-acceptance or merge.

Targeted SAST was skipped because the pinned opengrep binary is not cached;
CI owns that gate. No security/data/migration changes or new translation keys.

Initial full dependency installation hit ENOSPC as shared host space dropped.
Only this checkout's partial node_modules was removed; a filtered frozen install
succeeded after space recovered to 21 GiB. Initial Bun-only tooling errors were
resolved by using the already-installed Node binary, without code changes.

Evidence is retained in TALE-451's delivery box: before.log, after.log,
importers.log, docs.log, types.log, lint.log, format.log, manual.log, sast.log,
scoped-typecheck.ts and changes.patch.

Final CI

Exact head 061fd8a29f2fa6d79ca60a0e8cf6d22cb63cdfff, 2026-10-03 22:16Z:
54 successful checks, 8 skipped, 1 neutral; no failed or pending checks.
Format, Lint, Type check, Knip, Unit, UI, Browser, Opengrep, Build,
Performance, all platform E2E shards, image scan, image validation and smoke pass.

Logs confirm fresh cache-miss executions for UI unit (283 files / 2826 tests),
platform UI (567 files / 5211 tests), UI browser (34 files / 211 tests) and
platform browser (43 files / 307 tests). Other workspaces may replay cache.
E2E's artifact listing contains only the preview bundle, with no diagnostic-report
artifact. Skipped checks are not counted as passes.

Trivy's neutral code-scanning warning reports ten baseline configurations absent
from this PR, limiting alert comparison. It is disclosed rather than treated as
successful coverage or addressed by out-of-scope infrastructure changes.
The GraphQL-based gh checks watch stalled; authenticated REST check-run polling
completed against the exact head. CI snapshots and filtered run summaries are
retained alongside the local evidence. Independent browser acceptance remains
the permit/reviewer handoff described above.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Independent review of PR #4178 at 061fd8a29f2fa6d79ca60a0e8cf6d22cb63cdfff: accepted. No blocking findings.

Acceptance checks of #4059

Check Result Evidence
Every open SearchableSelect names its search input, listbox and popover; no caller can ship an unnamed search box ✅ met See the call-site notes below the table, and the real-browser table.
axe WCAG 2.1 A/AA on the open popover: no label violation for Project and Competence; the Agent type control stays clean ✅ met Real browser, own stack (below)
A packages/ui test renders with only label, opens it, and asserts the search and listbox names ✅ met searchable-select.test.tsx, "names the open picker from its %s label…" (Project and Competence). It asserts all three names, focus, jsdom axe, keyboard pick and focus return.

Call-site notes for the first check:

  • The fallback chain is at searchable-select.tsx:301-307. Its last resort is the existing localized common.search.placeholder.
  • A brace-aware scan of all 51 <SearchableSelect> call sites found:
    • 6 label-only and 2 aria-label-only callers, which are exactly the issue's 8;
    • no product caller without a naming prop. Only 6 Storybook stories reach the generic "Search".
  • I checked 6 product pickers in a real browser (table below).

Real-browser checks (I ran them)

Setup:

  • Stack: bun scripts/dev.ts per tests/manual/setup.md §1.A at this head, with its own PostgreSQL 16 and S3 double. Loopback only; egress goes to a dead proxy.
  • Data: synthetic only: an owner, a Member, two projects and the Member's own chat.
  • Browser: headless Chromium 1208, playwright-core 1.58.2 and axe-core 4.13.0 (the repository's copy), at 1280×900 en-US.
  • Names: Chrome's own computation, read through CDP Accessibility.getPartialAXTree.
  • axe: run on [data-radix-popper-content-wrapper] with the tags wcag2a/wcag2aa/wcag21a/wcag21aa.
  • Base: the merge base's searchable-select.tsx, swapped into the same worktree and stack (Vite serves the source), then restored. A re-run after the restore matches the head.
Picker (user) Head: search / list / popover name axe (popover) at head Keyboard at head Base
Chat hand-over › Project (Member) Project / Project / Project; focus in the search box 0 violations; the label rule passes on the input ↓ + Enter picks and focus returns to the trigger; Enter reopens into the search box; Esc returns to the trigger "" / "" / "", label (critical)
Grant competence › Competence (owner) Competence ×3 0 ✅ "" ×3, label (critical)
Standard agent › Agent type (owner, control) Search agent types / Agent type / Agent type 0 (2 color-contrast needs-review on options, the same at base) ✅ unchanged, 0 violations
Legal hold › User User ×3 0 ✅ "" ×3, label (critical)
Legal hold › Matter (empty list) Matter ×3 0 (aria-required-children needs-review on the empty list, the same at base) Esc ✅ (nothing to pick) "" ×3, label (critical)
Data subject requests › Subject Subject ×3 0 ✅ "" ×3, label (critical)
  • Rich-label path. No product caller uses it, so I made a local-only edit that turned the Project label into a ReactNode, then reverted it.

    • Chrome names all three "Project" from aria-labelledby, superseding aria-label="Search".
    • axe stays clean.
  • visual-aspect-analyzer gate. I used the skill's embed path with the CLI's knobs (pixels, autoScroll, 4 × 500 ms keyframes). An interact hook opens the picker before sampling, and the base ran first.

    Page Base Head
    Project 74 74
    Competence 73 73
    Agent type 97 98

    The gate does not reach 100 on these pages, at the head or at the base.

    • Every layout shift (≤ 0.013) happens during page load, before the popover's first frame.
    • The flickers are on the modal dialog's footer controls and on the nav behind it. They recur with each pixel-capture keyframe, and they occur on the base too.
    • The analyzer tracked the popover elements (dialog "Project", combobox "Project", the options) and reports no defect on them.
    • The only head-only entries are two load-phase sidebar shifts of at most 0.01 ("Enterprise SSO", "Data residency") on the Competence page. Both also appear at the base on the Agent type page.

    I attribute no defect to this ARIA-only change.

Local checks (I ran them)

  • packages/ui searchable-select.test.tsx at the head: 65/65.
  • Mutation check, running the merge base's component against the head's tests: 10 failed / 55 passed. All 10 new naming tests fail, and the explicit-name control passes.
  • Platform consumers, 8 files: 64/64. The files are create-task-from-chat (2 files), grant-competence-dialog, standard-agent-editor, conversation-routing-policy-editor, conversation-assignee-picker, file-request-dialog and legal-hold-dialog.
  • oxlint --type-aware on the 2 TS files, oxfmt --check and git diff --check: all clean.
  • lint:manual passes at the head (1,438 boxes) and on the local merge (1,441 boxes). It isn't wired into CI.

Exact-head CI (my REST read, 2026-10-04 ~00:00Z)

63 check runs: 54 success, 8 skipped, 1 neutral, 0 failed, 0 pending.

  • Skipped: 5 × Candidate gate, Backend integration, Smoke test (fork PR) and Validate images (fork PR). I don't count the skipped runs as passes.
  • Neutral: Trivy 111302951768.
  • Key check IDs: Format 111288891475, Lint 111288891523, Type check 111288891482, Knip 111288891495, Unit 111288891556, UI 111288891582, Browser 111288891552, Build 111288891508, Opengrep 111288892319, Storybook 111291976947, Playwright platform 1/16 111292610304 through 16/16 111292610404.
  • Job logs:
    • UI: @tale/platform:test:ui was a cache miss; 5,211 tests passed.
    • Unit: force-executed, and searchable-select.test.tsx (65 tests) passed.
    • Browser: a cache miss; 211 and 307 tests passed.

Author claims I did not re-run

  • The ui-docs tests (19/19).
  • The scoped tsc. CI's Type check passed.
  • SAST. CI's Opengrep passed.
  • The "failing-before" count of 2 failed / 54 passed (56). It predates the final test file; with the final file I measured 10 failed / 55 passed.

No screen reader was used. The names come from Chrome's accessibility tree.

Findings (none blocking)

  1. NIT, docs. services/ui-docs/content/components/input.md:72 recommends label "including when you provide a custom trigger".
    • With a custom trigger, the rendered <Label htmlFor> points at id ?? <generated>-trigger (searchable-select.tsx:299, :314, :668). The custom trigger doesn't carry that id unless the caller sets it.
    • So the visible label isn't associated with the trigger, although it still names the open picker.
    • Suggested wording: prefer aria-label for a custom trigger, or give the trigger the same id. This is pre-existing component behaviour, and the change is optional.
  2. Note, UX (caller follow-up). Label-only pickers now read the same name three times: the "Project" dialog, the "Project" combobox and the "Project" list.
    • That meets the issue's "at least the field's own label".
    • A caller-specific searchPlaceholder such as "Search projects" would read better, but that is out of scope for this component-only PR.
  3. Out of scope, pre-existing. A page-level axe scan with the hand-over dialog open reports color-contrast (serious) on the Home row age (home-rows.tsx:109): 3.16:1 at 11 px.

Merge

The merge is agent #2's, under TALE-359.

  • Re-read the head and the checks, then use the protected squash merge with --match-head-commit 061fd8a29f2fa6d79ca60a0e8cf6d22cb63cdfff.
  • The branch is 8 commits behind main, and the trial merge is clean.

I made no merge, push or card move. My stack is stopped, and heavy permit H1 is released.

Evidence: TALE-508's delivery box holds tale508-evidence.tar.gz (scripts, per-picker JSON with names, axe and keyboard results, screenshots, analyzer reports and logs), with SHA256SUMS and INDEX.md.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Merge blocked by a conflict with main, not by the review. From agent #2, TALE-359 run e72629f1.

Agent #3's acceptance at 061fd8a29f2fa6d79ca60a0e8cf6d22cb63cdfff (record) stands. Since 00:02Z, though, main (now 0592b64a9) carries #4164, which inserts a row at the top of the same register table in services/platform/tests/manual/reference/automation.md (line 17), so this head no longer merges cleanly. Agent #3's trial merge was clean against 2b27d77b3, before #4164 landed.

  • Needed from the implementer: rebase onto main and keep both rows. That is the only conflict (git merge-tree --write-tree origin/main 061fd8a29).
  • Then: I'll check that the interdiff against 061fd8a29 is only that row and that CI is green at the new head, then merge under the existing acceptance. Anything more in the interdiff goes back for review.

@yannickmonney

yannickmonney commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor Author

TALE-565 register-only merge repair: merged origin/main 67c724a54d851803b7c6204bc13241f527e9a6a1 without rebasing or force-pushing.

New head: 2ac58e46e6f3deaf28275c6cce47170ea6fadc88. Conflicted file: services/platform/tests/manual/reference/automation.md. Both sides’ rows are preserved below the table delimiter.

Interdiff: only the register merge (verified with git show --remerge-diff); no implementation edits beyond Git’s automatic merge. bun run lint:manual passes. Conflict-marker and whitespace checks pass; commit hooks pass (Markdown is excluded by the repository formatter).

Hosted CI is queued; no rerun or cancellation requested. No PR merge, review verdict or card move. Agent #2 owns exact-head verification and merge once CI is green.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Register-only rebase completed; merged current main and retained all automation-register rows. Exact new head: cce9e641a97d5261f8c7cc175a893ca417435a86. Scope unchanged except the merge; please recheck this head with fresh CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ui): a SearchableSelect without searchPlaceholder opens an unnamed search box and list

1 participant