fix(SelectMenu): bind id and aria attributes on trigger#6572
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughSelectMenu.vue refactors how attributes are bound to Reka UI's Combobox components. The Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
commit: |
🔗 Linked issue
Resolves #6564
❓ Type of change
📚 Description
SelectMenuwas bindingid(along with$attrsandariaAttrs) onComboboxRoot. Reka'sComboboxRoothas noidprop, so it only reached the focusable trigger via$attrsfallthrough through theas-childchain.This aligns
SelectMenuwithSelect(which binds these onSelectTrigger) andInputMenu(which binds them on the input):id,$attrsandariaAttrsnow go directly on the focusableComboboxTrigger, whileComboboxRootonly receivesrootProps. No visible DOM change, theidstill lands on the trigger button and theFormFieldlabel keeps targeting it, but it no longer relies on attribute fallthrough.Snapshots updated accordingly.