Skip to content
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

File widget <input> id does not match <label> for #195

Open
ewohnlich opened this issue Mar 5, 2024 · 0 comments
Open

File widget <input> id does not match <label> for #195

ewohnlich opened this issue Mar 5, 2024 · 0 comments

Comments

@ewohnlich
Copy link

This can be illustrated with the default File type. The has for="form-widgets-file". The main file input has id="form-widgets-file-input". Meanwhile, there is a containing

with id "form-widgets-file". I don't know if that is actually sufficient for screen readers, but dequeue is flagging it as a WCAG2 accessibility issue.

I checked the blame and it goes all the way back to 2009 in the initial commit for plone.formwidgets.namedfile! https://github.com/plone/plone.formwidget.namedfile/blob/f62ccebf42e097fa792774cac9dcb288b7407250/plone/formwidget/namedfile/file_input.pt. I think we can probably change it so that the

has id ${view/id}-container (form-widgets-file-container) and the input has id ${view/id} (form-widgets-file) and update the JS references to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant