Skip to content

fix(select): wcag fixes #58 - #767

Open
airikej wants to merge 4 commits into
rcfrom
fix/58-select-wcag-react-issues-fixes
Open

fix(select): wcag fixes #58#767
airikej wants to merge 4 commits into
rcfrom
fix/58-select-wcag-react-issues-fixes

Conversation

@airikej

@airikej airikej commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added touch/pen behavior to defer opening the soft keyboard for searchable selects.
  • Accessibility Improvements
    • Screen readers now prioritize helper/error text over placeholder content.
    • Multi-select option removal controls now expose “Remove ” accessible names.
    • Improved combobox naming/description behavior when IDs are omitted and when used within an input group.
  • Bug Fixes
    • Updated placeholder styling and refined select ID handling to keep container and input identifiers distinct and stable.

@airikej airikej linked an issue Jul 29, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@airikej, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a796bcb6-2158-44b0-aac0-f1df3d385390

📥 Commits

Reviewing files that changed from the base of the PR and between 05e627c and b27ea98.

📒 Files selected for processing (2)
  • src/tedi/components/form/select/select.spec.tsx
  • src/tedi/components/form/select/select.tsx
📝 Walkthrough

Walkthrough

Select accessibility and touch interaction behavior were updated through resolved react-select IDs, filtered descriptions, localized removable-value labels, soft-keyboard suppression, placeholder styling changes, regression tests, and new or corrected stories.

Changes

Select accessibility

Layer / File(s) Summary
Resolved identifiers and touch behavior
src/tedi/components/form/select/select.tsx
Select computes separate container and input IDs, forwards them to react-select, and suppresses the soft keyboard for configured touch and pen interactions.
Resolved descriptions and accessibility coverage
src/tedi/components/form/select/components/select-input.tsx, src/tedi/components/form/select/select.spec.tsx
Placeholder references are removed from aria-describedby while helper descriptions are retained, with regression tests for labels, descriptions, IDs, and InputGroup integration.
Removable value labels
src/tedi/components/form/select/components/select-multi-value.tsx, src/tedi/components/form/select/components/select-multi-value-remove.tsx, src/tedi/components/form/select/select.spec.tsx
Removable tags use localized “Remove” titles with label/value fallbacks, and tests query the resulting accessible names.
Placeholder styling and usage examples
src/tedi/components/form/select/select.module.scss, src/tedi/components/form/select/select.stories.tsx
Placeholder styling is scoped to the select control, size story IDs are corrected, and a touch keyboard deferral story is added.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Select
  participant ReactSelect
  User->>Select: tap select control
  Select->>Select: determine pointer target
  Select->>ReactSelect: pass softKeyboardSuppressed
  ReactSelect->>Select: render input with resolved IDs
  User->>Select: tap input
  Select->>ReactSelect: allow soft keyboard
Loading

Possibly related PRs

Suggested reviewers: ly-tempel-bitweb, mart-sessman

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: WCAG/accessibility fixes in the select component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/58-select-wcag-react-issues-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/tedi/components/form/select/select.stories.tsx`:
- Line 69: Update the Select invocation in the small-size story so `{...args}`
is spread before the explicit `size="small"` prop, ensuring the Small variant
always overrides any value supplied through args while preserving the existing
label and id props.

In `@src/tedi/components/form/select/select.tsx`:
- Line 712: Update the Select input’s id assignment near resolvedId so a labeled
InputGroup uses the group’s inputId unchanged rather than appending “-input”;
preserve the existing derived id behavior for standalone Select instances. Add a
regression test covering Select inside a labeled InputGroup and verify the
external label targets the rendered combobox.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c8ec908a-3b37-4dff-ac5a-9fdb3ebb4bb6

📥 Commits

Reviewing files that changed from the base of the PR and between 1f557c8 and e99948b.

📒 Files selected for processing (7)
  • src/tedi/components/form/select/components/select-input.tsx
  • src/tedi/components/form/select/components/select-multi-value-remove.tsx
  • src/tedi/components/form/select/components/select-multi-value.tsx
  • src/tedi/components/form/select/select.module.scss
  • src/tedi/components/form/select/select.spec.tsx
  • src/tedi/components/form/select/select.stories.tsx
  • src/tedi/components/form/select/select.tsx

Comment thread src/tedi/components/form/select/select.stories.tsx Outdated
Comment thread src/tedi/components/form/select/select.tsx Outdated
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/tedi/components/form/select/select.tsx`:
- Line 831: Scope handlePointerDownCapture in the select rendering flow to the
react-select control rather than the wrapper containing FormLabel and
FeedbackText, or explicitly ignore and reset events whose target is outside
.tedi-select__control. Preserve keyboard-suppression behavior for pointer events
originating within the select control.
- Around line 514-516: Update handlePointerDownCapture so the early-return path
for openKeyboardOnTouch or !isSearchable also clears suppressSoftKeyboard,
ensuring inputMode is no longer suppressed after configuration changes. Preserve
the existing pointer-type handling for enabled, searchable selects.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 95b33d9b-6b02-4f06-a14c-c7545c34c5b0

📥 Commits

Reviewing files that changed from the base of the PR and between e99948b and 05e627c.

📒 Files selected for processing (4)
  • src/tedi/components/form/select/components/select-input.tsx
  • src/tedi/components/form/select/select.spec.tsx
  • src/tedi/components/form/select/select.stories.tsx
  • src/tedi/components/form/select/select.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/tedi/components/form/select/components/select-input.tsx
  • src/tedi/components/form/select/select.spec.tsx

Comment thread src/tedi/components/form/select/select.tsx
Comment thread src/tedi/components/form/select/select.tsx
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.

[Select]: WCAG react issues

1 participant