When I run Lighthouse Report I get the following notice:

Form elements do not have associated labels

<input type="text" id="edit-masquerade-user-field" name="masquerade_user_field" value="" size="18" maxlength="128" class="form-text required form-autocomplete" autocomplete="OFF" aria-autocomplete="list">

Comments

albertski created an issue. See original summary.

albertski’s picture

Status: Active » Needs review
StatusFileSize
new463 bytes

Added the aria-label element to the autocomplete field.

gmaka’s picture

Status: Needs review » Reviewed & tested by the community

This looks ok to me.

andypost’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

I'm not much familiar with it, any pointer to docs/guide?
maybe d8 version need top port it too?
should we add a test to make sure input always use this role?

albertski’s picture

Labels ensure that form controls are announced properly by assistive technologies, like screen readers. https://dequeuniversity.com/rules/axe/3.1/label

andypost’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Good to know, thanks!

ressa’s picture

Status: Reviewed & tested by the community » Closed (outdated)

Thanks everyone for working on this. In an attempt to help the maintainers, I am going through some of the Drupal 7 issues, and closing them, since Drupal 7 is EOL.

Maintainers should grant credit for the great work to the relevant users, even if the patch did not get committed: https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett....

Since Drupal 7 is EOL, we can probably close this issue, but feel free to re-open if this is still relevant for the Drupal 11 version.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.