Skip to content

Offscreen Text <label for="p1" class="sr-only> reported as error #1454

@DavidMacDonald

Description

@DavidMacDonald

Expectation: Don't fail offscreen label, or provide warning, or ignore it if the label string contains "search"
<label class="sr-only" for="p1" >search</label><input type="text" id="p1">

Actual: fails offscreen label

Motivation: sometimes the visual label is obvious such as a search input with a magnifying glass button next to it. If aria-label is used it passes but offscreen explicitly associated label is not. this seems inconsistent.


axe-core version: 3.1.2
axe-webdriver, extension or other integration version: X.Y.Z

Browser and Assistive Technology versions

For Tooling issues:
- Node version: XX  
- Platform:  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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