Open BRobin55 opened 2 weeks ago
Looks like autoFocus
should be passed through Select -> useSelect -> triggerProps, I don't see any reason not to do that.
As for excludeFromTabOrder
, that should be removed from the types, we did not intend for that to be there. https://github.com/adobe/react-spectrum/issues/6727#issuecomment-2238868025
Great thanks for the quick reply! Seems appropriate to modify useSelect to extend the triggerProps with autoFocus
.
Another thing that caught my attention is the autoComplete
prop. It doesn’t seem to be used anywhere and, in my opinion, isn’t relevant for the component.
Hmm interesting, it appears not to be passed through to our HiddenSelect in RAC.
It's handled in a hidden native select that backs ours https://github.com/adobe/react-spectrum/blob/68e305768cb829bab7b9836dded593bd731259f3/packages/%40react-aria/select/src/HiddenSelect.tsx#L116
Hopefully we just forgot to pass it through, I don't see anything to indicate otherwise.
More links for supporting it:
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
Provide a general summary of the issue here
The
<Select />
component incorporates the props autoFocus and excludeFromTabOrder. Unfortunately the props do not work as described in the documentation.Select documentation
🤔 Expected Behavior?
When setting the
autoFocus
prop to true the<Button />
inside the<Select />
component should be focused on initial render.When the
excludeFromTabOrder
prop is being set to true for the<Select />
component, the<Button />
should not be focusable by tabbing.😯 Current Behavior
By setting the
autoFocus
prop nothing changes for the focusable behavior. By setting theexcludeFromTabOrder
prop nothing changes for the focusable behavior.💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
Sandbox
Version
3.18.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
MacOS 14.6.1 (23G93)
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response