Skip to content

Fifth rule code example does not match the text that describes it #54

@SaraSoueidan

Description

@SaraSoueidan

In the Using ARIA document (working draft) (as well as the latest published docs), the text above the second code sample says that the code shows a <label> being associated with its input. But the code sample uses aria-label & aria-labelledby instead.

Text:

In comparison, the input type=text in the code example below has a visible label 'user name' and an accessible name. This example has an accessible name because the input element is a labelable element and the label element is used correctly to associate the label text with the input.

Code sample (note that even the code comment does not match the code)

<!-- Note: use of for/id or wrapping label around text
and control methods will result in an accessible name -->

<input type="text" aria-label="User Name">

or

<span id="p1">user name</span> <input type="text" aria-labelledby="p1">

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