Open charliematters opened 3 years ago
Do you have a link to the workaround for "ones with a search prop" that you mentioned? This seems to impact testing with something like react-testing-library where ideally you select by label as well. And I would imagine accessibility as well.
oh, I see the sandbox showed the workaround. thank you.
Feature Request
Problem description
Form selects don't focus themselves when clicking an associated label. There is a workaround for ones with a
search
prop, but seemingly no way of doing it for the othersProposed solution
If a
<Dropdown>
,<Select>
or<Form.Select>
is passed anid
prop, it should support focussing when clicking a label with a matchinghtmlFor
prop, whether generated from thelabel
field or otherwiseDemonstration of current behaviour:
https://codesandbox.io/s/semantic-ui-react-forked-3ey2b?file=/index.js