-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessibility: Textfields are missing Labels #29
Comments
Thanks @schellmax , When BalmUI is 6.x, I use I also think it is better to use |
elf-mouse
added a commit
that referenced
this issue
Nov 20, 2020
elf-mouse
added a commit
that referenced
this issue
Nov 20, 2020
Hi @schellmax , It's improved.
Thanks again :) |
nice! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As mentioned in the docs at https://material.balmjs.com/#/data-input/textfield Textfield labels are passed through the default slot:
<ui-textfield>Label Text</ui-textfield>
and end up in the rendered HTML wrapped in a 'span' tag:
<span class="mdc-floating-label">Label Text</span>
In the original Material Design Component at https://material-components.github.io/material-components-web-catalog/#/component/text-field the appropriate 'label' element is used instead:
<label for="text-field-hero-input" class="mdc-floating-label">Name</label>
There is also a 'label' prop mentioned in the docs, but it seems not to be used by the component.
Label elements are critical for accessibility and should therefore be used for every form input. Balm UI already uses label elements e.g. for checkbox components; usage in Textfields would be highly appreciated.
The text was updated successfully, but these errors were encountered: