Skip to content

False positive color-contrast: ignore purely decorative text #4755

Open
@straker

Description

@straker

Text that is decorational should not need to pass color-contrast. The main problem is figuring out how to detect that text is decorational. Color-contrast purposefully does not exclude hidden elements, so adding aria-hidden to the element does not exclude it from running. This is intentional as hidden from screen readers is not the as as hidden from visual users.

We need to figure out how best to either determine the text is decorational or a better way to markup the element to let us know it's decorational.

<div style="background: #d4e9e2; padding: 10px">
  <p style="color: white">Decorational text</p>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixBug fixesrulesIssue or false result from an axe-core rulesupport

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions