FR: add <label>
to menuSelect
#5220
Replies: 3 comments
-
This is a good point, and should either be solved on the menu select (plus other select widgets) or symbiotically through the panel widget. For the time being you could wrap the container div in a label already like this: menuSelect({
container: '#menu-select',
attribute: 'brand'
}) <label>
Brands
<div id="menu-select"></div>
</label> That would act like this: https://codesandbox.io/s/sharp-cerf-c8gz8w?file=/index.html |
Beta Was this translation helpful? Give feedback.
-
Hi @Haroenv
The select is always wrapped with a |
Beta Was this translation helpful? Give feedback.
-
For now, the workaround can be either manually add the attribute to the select with js after rendering the first time (nothing should make the dom element change), or creating a custom widget |
Beta Was this translation helpful? Give feedback.
-
A
<select>
without a<label>
is not very user friendly and not good from a a11y perspective.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
Please add a parameter to the userSelect widget, that outputs this.
CURRENT OUTPUT
FUTURE OUTPUT 1
FUTURE OUTPUT 2
Beta Was this translation helpful? Give feedback.
All reactions