You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the Select component gives a few accessibility warnings. Vanilla it saya the aria-* atributes don't match the role on the select anchor. Since the select anchor is a div and not role is set, but aria-required is for a required field, it give this warning
To Reproduce
Steps to reproduce the behavior:
Run lighthouse on https://sveltematerialui.com/demo/select/
Scroll down to 'Requires'
See error
You can get rid of the error by setting the role on the anchor to combobox with <Select anchor$role="combobox" required>, but then you have an issue that aria-expanded is not set initially (it's required). Additionally, it's not labelled so I added
aria-expanded="false"
aria-labelledby={inputId + '-smui-label'} // <-- maybe this should be a variable for DRY
to the div that is the anchor and patched.
Now lighthouse is happy, and I'm fairly certain combo box it the correct semantics
The text was updated successfully, but these errors were encountered:
Using the Select component gives a few accessibility warnings. Vanilla it saya the
aria-*
atributes don't match the role on the select anchor. Since the select anchor is a div and not role is set, butaria-required
is for a required field, it give this warningTo Reproduce
Steps to reproduce the behavior:
https://sveltematerialui.com/demo/select/
You can get rid of the error by setting the role on the anchor to combobox with
<Select anchor$role="combobox" required>
, but then you have an issue thataria-expanded
is not set initially (it's required). Additionally, it's not labelled so I addedto the
div
that is the anchor and patched.Now lighthouse is happy, and I'm fairly certain combo box it the correct semantics
The text was updated successfully, but these errors were encountered: