Skip to content

label-content-name-mismatch does not account for formatting markup #3316

@curtbellew

Description

@curtbellew

Rule label-content-name-mismatch doesn't seem to account for formatting markup. Example:

<button aria-label="button label">button<br>label</button>

Will return a violation.

Product: axe-core

Expectation: Formatting should be disregarded.

Actual: The string is compared directly so any HTML tabs present cause a violation

Motivation:


axe-core version: 4.1.3
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

    fixBug fixesprA pr has been created for the issuerulesIssue or false result from an axe-core rule

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions