Skip to content

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

@ewohnlich

Description

@ewohnlich

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions