Description
Product
axe Extension
Product Version
Extension: v4.77.1 axe-core: v4.8.4
Latest Version
- I have tested the issue with the latest version of the product
Issue Description
I was testing some content for WCAG 2.1 SC 2.5.3 and noticed that my example wasn't being flagged by axe DevTools. To confirm the issue, I created a page to test this in a CodeSandbox using all the Fail examples for the rule. I ran the extension on the example page and got 0 issues, except for 2 issues caused by the CodeSandbox injected button.
To make sure the button wasn't the cause, I created a page locally to test it and got the same result, no issues with the page.
Expectation
label-content-name-mismatch rule fails on 3 separate elements
Actual
0 issues found
How to Reproduce
- Open CodeSandbox example page or use the code shared below to test locally
- Run axe DevTools full page scan
- Observe 0 issues found
For future context, in case the CodeSandbox gets deleted, here is the used code:
Sample page that should produce WCAG 2.5.3 failures
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>WCAG SC 2.5.3 test</title>
</head>
<body>
<main>
<h1>Examples of failures for WCAG SC 2.5.3 Label in Name</h1>
<div role="link" aria-label="OK">Next</div>
<button name="link" aria-label="the full">The full label</button>
<button type="button" aria-label="definitely not WCAG 2.5.3 compliant">
mysterious button
</button>
</main>
</body>
</html>
Additional context
Below are 2 screenshots, with alt text, of the 0 issues in axe DevTools and a successful failure identification by a different accessibility checker: