Skip to content

Expose skill autocomplete state to assistive technology - #1575

Open
open-inspect[bot] wants to merge 3 commits into
mainfrom
fix/react-doctor-combobox-role
Open

Expose skill autocomplete state to assistive technology#1575
open-inspect[bot] wants to merge 3 commits into
mainfrom
fix/react-doctor-combobox-role

Conversation

@open-inspect

@open-inspect open-inspect Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes 1 root-cause task from the nightly React Doctor scan.

  1. react-doctor/role-supports-aria-props in packages/web/src/components/prompt-skill-autocomplete.tsx:180
    • Problem: The managed-skill autocomplete exposed aria-expanded, aria-controls, aria-autocomplete, and aria-activedescendant on a textarea with the implicit textbox role, which does not support the expansion state.
    • Change: Declare the existing autocomplete interaction as role="combobox" and update focused role-based tests.
    • Impact: Screen readers can recognize the control as an autocomplete combobox and receive its expanded/collapsed state. Keyboard, pointer, composition, focus, and prompt-length behavior remain unchanged.
    • Human severity: Medium accessibility issue (scanner severity: warning).

Task accounting

  • Root-cause tasks fixed: 1
  • Raw diagnostics cleared: 1
  • The selected diagnostic had a null fixGroupId, so it counts as one ungrouped task unit.
  • No non-null fixGroupId was selected or split.

React Doctor results

React Doctor version: 0.9.12, schema version: 3, full scope, packages/web.

Metric Before After
Total diagnostics 87 86
Errors 2 2
Warnings 85 84
Affected files 44 43
Score 62 63
role-supports-aria-props 1 0

The full before/after ID comparison reports exactly the selected diagnostic removed and no diagnostics added. The changed-scope scan against origin/main reports 100/100 with no findings in the two changed files.

Validation

  • npx vitest run src/components/prompt-skill-autocomplete.test.tsx: pass, 8 tests
  • npm run typecheck: pass
  • npm run lint: pass
  • npx prettier --check packages/web: pass
  • npm test: pass, 160 files and 1,206 tests
  • npx -y react-doctor@latest . --json --json-out /tmp/react-doctor-after.json --yes --blocking none: pass; selected finding removed, no new findings
  • npx -y react-doctor@latest . --verbose --scope changed --base origin/main --yes --blocking none: pass, no findings
  • npm run build: pre-existing failure reproduced unchanged; see below

The change is semantic-only and has no visual output change, so browser screenshot comparison was not required. Rendered jsdom tests verify the combobox role, listbox relationship, expansion state, keyboard and pointer selection, focus retention, composition handling, and prompt-length behavior. No additional visual verification is missing.

Pre-existing failures

  • npm run build compiles and typechecks, then fails while prerendering /_global-error with TypeError: Cannot read properties of null (reading 'useContext'). It also emits repeated pre-existing missing-key warnings for Next-generated <html>, <head>, <meta>, and viewport boundaries. The same failure and digest (3074926929) occurred before editing.
  • Running npx prettier --check . from inside packages/web does not inherit the repository-root .prettierignore and checks generated .next output. The repository-scoped check npx prettier --check packages/web from the root passes, as does a direct check of both changed files.

Deferred findings

  • The two error-level effect-needs-cleanup findings were rejected as detector false positives after applying the canonical validation recipe: use-provider-device-authorization.ts already clears both timers and aborts polling in its returned effect cleanup; use-session-transport.ts creates the socket in a later async callback and the owning mount effect closes it during teardown.
  • Performance findings such as js-combine-iterations, js-set-map-lookups, rerender-lazy-state-init, and rerender-memo-with-default-value were deferred because their canonical recipes require runtime measurements that are unavailable to unattended automation.
  • Giant-component, effect/state synchronization, localStorage migration, locale/time-zone, dynamic-import/loading-state, index-key, remote-image configuration, terminal iframe sandbox, SVG precision, and integration/settings findings remain for code-owner or product judgment.
  • All non-null fixGroupId groups remain intact for later review; none were partially fixed.

Created with Open-Inspect

@open-inspect open-inspect Bot added the react-doctor Opened by react-doctor label Aug 23, 2026
@github-actions

Copy link
Copy Markdown

Terraform Validation Results

Step Status
Format
Init
Validate
Tests

Note: Terraform plan was skipped because secrets are not configured. This is expected for external contributors. See docs/GETTING_STARTED.md for setup instructions.

Pushed by: @open-inspect[bot], Action: pull_request

Comment thread packages/web/src/components/prompt-skill-autocomplete.tsx Outdated
…obox-role

# Conflicts:
#	packages/web/src/components/prompt-skill-autocomplete.test.tsx
@github-actions

Copy link
Copy Markdown

Terraform Validation Results

Step Status
Format
Init
Validate
Tests

Note: Terraform plan was skipped because secrets are not configured. This is expected for external contributors. See docs/GETTING_STARTED.md for setup instructions.

Pushed by: @open-inspect[bot], Action: pull_request

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

Labels

react-doctor Opened by react-doctor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant