Skip to content

A11y: A form label must be associated with a control #5300

Closed
@lagden

Description

@lagden

I think this rule needs more accuracy.

According to w3 (https://www.w3.org/TR/html401/interact/forms.html#h-17.9.1), the code can be written this way:

<label>
  <span aria-label="First Name">First Name</span>
  <input type="text" name="firstname">
</label>

The way above solve A11y problem, right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting submitterneeds a reproduction, or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions