aria-labelledby in select referring to both label, and selected value elements #3821
alirezamirian
started this conversation in
General
Replies: 1 comment 2 replies
-
The reason we have multiple values in this |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not sure if it's an expected behaviour or not, but the select is specified as labelled by both the label element and the value element:
It's causing issues when selecting a react-aria-powered select element with playwright's role selector (
page.getByRole('button', { name: 'the label' })
). Maybe it's a bug in playwright's selector, and not sure if multiple aria-labelledby is allowed. But in any case, it seems a little weird to label the select by the selected value. Perhaps it was done so to have the select labeled by the placeholder value, which still can be questionable.If it's not by design, I can open an issue (and maybe PR) to fix it.
Beta Was this translation helpful? Give feedback.
All reactions