Skip to content

fix(SelectMenu): bind id and aria attributes on trigger#6572

Merged
benjamincanac merged 1 commit into
v4from
fix/select-menu-id
Jun 9, 2026
Merged

fix(SelectMenu): bind id and aria attributes on trigger#6572
benjamincanac merged 1 commit into
v4from
fix/select-menu-id

Conversation

@benjamincanac

Copy link
Copy Markdown
Member

🔗 Linked issue

Resolves #6564

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)

📚 Description

SelectMenu was binding id (along with $attrs and ariaAttrs) on ComboboxRoot. Reka's ComboboxRoot has no id prop, so it only reached the focusable trigger via $attrs fallthrough through the as-child chain.

This aligns SelectMenu with Select (which binds these on SelectTrigger) and InputMenu (which binds them on the input): id, $attrs and ariaAttrs now go directly on the focusable ComboboxTrigger, while ComboboxRoot only receives rootProps. No visible DOM change, the id still lands on the trigger button and the FormField label keeps targeting it, but it no longer relies on attribute fallthrough.

Snapshots updated accordingly.

Mirror `Select` by binding `id`, `$attrs` and `ariaAttrs` directly on the focusable `ComboboxTrigger` instead of `ComboboxRoot`, which has no `id` prop and only forwarded it via `$attrs` fallthrough.
@github-actions github-actions Bot added the v4 #4488 label Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b03f8722-cb77-405d-99dd-ee4fb4e8b08c

📥 Commits

Reviewing files that changed from the base of the PR and between 9e5b8a6 and 5d400c5.

⛔ Files ignored due to path filters (2)
  • test/components/__snapshots__/SelectMenu-vue.spec.ts.snap is excluded by !**/*.snap
  • test/components/__snapshots__/SelectMenu.spec.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (1)
  • src/runtime/components/SelectMenu.vue

📝 Walkthrough

Walkthrough

SelectMenu.vue refactors how attributes are bound to Reka UI's Combobox components. The ComboboxRoot element no longer receives the component's id attribute or spreads $attrs and ariaAttrs; instead, it binds only rootProps. The ComboboxTrigger element is updated to explicitly forward $attrs and ariaAttrs via v-bind, ensuring these attributes are applied to the trigger element rather than the root.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly summarizes the main change: moving id and aria attributes binding from ComboboxRoot to ComboboxTrigger.
Description check ✅ Passed The description clearly explains the bug, the fix applied, and its alignment with similar components, directly relating to the changeset.
Linked Issues check ✅ Passed The PR directly addresses issue #6564 by moving id binding to the focusable trigger element, ensuring FormField labels and accessibility tools correctly target the control.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the id attribute binding issue in SelectMenu; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #6564

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/select-menu-id

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 and usage tips.

@pkg-pr-new

pkg-pr-new Bot commented Jun 9, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/ui@6572

commit: 5d400c5

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

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility issues with RekaUI integration

1 participant