Skip to content

<select> elements with no label not picked up as an error #12639

@asilano

Description

@asilano

Consider the following minimal HTML page:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Bad form</title>
  </head>
  <body>
    <form>
      <input name="unlabelled_input">
      <select name="unlabelled_select">

      </select>
    </form>
  </body>
</html>

Neither the input nor the select have a label of any kind. However, Lighthouse Accessibility only picks up the input:
image

If I run the Axe extension over the page directly, it picks up two different errors, "Form elements must have labels" and "Select element must have an accessible name":
image

but Lighthouse is only reporting the first of these. It should report both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions