Rule examples: failing and passing inputs
Every example below is generated by running the real audit on the input shown (npm run examples). The same inputs are asserted in test/rules.test.mjs, so these pages cannot drift from the tested behaviour. HTML examples sit inside a minimal valid document so that other rules stay quiet.
Note: "Passing" means this rule did not fire on the input. It does not mean the input is accessible or well designed.
RS-A11Y-001: Image has no alt attribute#
Category: accessibility. Default severity: high. Criterion: WCAG 1.1.1.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<img src="a.png" width="10" height="10">
</main>
</body>
</html>
Result: RS-0001 [high/confirmed] Image has no alt attribute at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<img src="a.png" alt="Company logo" width="10" height="10">
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-002: Document has no lang attribute#
Category: accessibility. Default severity: medium. Criterion: WCAG 3.1.1.
Failing input
/* index.html */
<!doctype html>
<html>
<head><title>T</title><meta name="viewport" content="width=device-width"></head>
<body><main>x</main></body>
</html>
Result: RS-0001 [medium/confirmed] Document has no lang attribute at index.html:2
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
x
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-003: Viewport meta disables zoom#
Category: accessibility. Default severity: high. Criterion: WCAG 1.4.4.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>T</title>
</head>
<body>
<main>
x
</main>
</body>
</html>
Result: RS-0001 [high/confirmed] Viewport meta disables or limits zoom at index.html:5
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
x
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-004: Button or link has no accessible name#
Category: accessibility. Default severity: high. Criterion: WCAG 4.1.2, 2.4.4.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<button class="x"></button>
</main>
</body>
</html>
Result: RS-0001 [high/confirmed] Button has no accessible name at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<button class="x" aria-label="Close dialog"></button>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-004 (link): Button or link has no accessible name#
Category: accessibility. Default severity: high. Criterion: WCAG 4.1.2, 2.4.4.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<a href="/home"></a>
</main>
</body>
</html>
Result: RS-0001 [high/confirmed] Link has no accessible name at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<a href="/home">Home</a>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-005: Form control has no programmatic label#
Category: accessibility. Default severity: high. Criterion: WCAG 1.3.1, 3.3.2, 4.1.2.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<input type="text" name="q">
</main>
</body>
</html>
Result: RS-0001 [high/review-required] Form control has no programmatic label at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<label for="q">Search</label><input id="q" type="text" name="q">
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-006: Positive tabindex#
Category: accessibility. Default severity: medium. Criterion: WCAG 2.4.3.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<div tabindex="3">x</div>
</main>
</body>
</html>
Result: RS-0001 [medium/confirmed] Positive tabindex overrides natural focus order at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<div tabindex="0">x</div>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-007: Click handler on non-interactive element#
Category: accessibility. Default severity: high. Criterion: WCAG 2.1.1, 4.1.2.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<div onclick="go()">Go</div>
</main>
</body>
</html>
Result: RS-0001 [high/confirmed] Click handler on non-interactive <div> without role or tabindex at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<div onclick="go()" role="button" tabindex="0">Go</div>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-008: Document has no title#
Category: accessibility. Default severity: medium. Criterion: WCAG 2.4.2.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head><meta name="viewport" content="width=device-width"></head>
<body><main>x</main></body>
</html>
Result: RS-0001 [medium/confirmed] Document has no title at index.html:2
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
x
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-009: Heading level skipped#
Category: accessibility. Default severity: low. Criterion: WCAG 1.3.1.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<h1>Title</h1>
<h3>Skipped</h3>
</main>
</body>
</html>
Result: RS-0001 [low/review-required] Heading level skips from h1 to h3 at index.html:11
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<h1>Title</h1>
<h2>Section</h2>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-010: Focus indicator removed#
Category: accessibility. Default severity: high. Criterion: WCAG 2.4.7.
Failing input
/* a.css */
a:focus { outline: none; }
Result: RS-0001 [high/confirmed] Focus indicator removed (a:focus) at a.css:1
Passing input
/* a.css */
a:focus { outline: none; box-shadow: 0 0 0 3px #0b5cad; }
Result: rule did not fire
RS-A11Y-011: Hover styles without focus styles#
Category: accessibility. Default severity: medium. Criterion: WCAG 2.4.7.
Failing input
/* a.css */
a:hover { color: #b00020; }
Result: RS-0001 [medium/review-required] :hover styles exist but no :focus or :focus-visible styles at a.css:1
Passing input
/* a.css */
a:hover { color: #b00020; }
a:focus-visible { outline: 2px solid #0b5cad; }
Result: rule did not fire
RS-A11Y-012: Media autoplays without muted or controls#
Category: accessibility. Default severity: medium. Criterion: WCAG 1.4.2.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<video autoplay src="a.mp4"></video>
</main>
</body>
</html>
Result: RS-0001 [medium/review-required] Media autoplays without muted or controls at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<video autoplay muted src="a.mp4"></video>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-013: Text contrast below minimum (measured)#
Category: accessibility. Default severity: high. Criterion: WCAG 1.4.3.
Failing input
/* a.css */
.note { color: #999999; background: #ffffff; }
Result: RS-0001 [high/confirmed] Text contrast 2.85:1 is below 4.5:1 (#999999 on #ffffff) at a.css:1
Passing input
/* a.css */
.note { color: #595959; background: #ffffff; }
Result: rule did not fire
RS-A11Y-014: Interactive target below 24x24 CSS px#
Category: accessibility. Default severity: medium. Criterion: WCAG 2.5.8.
Failing input
/* a.css */
.icon-btn { width: 16px; height: 16px; }
Result: RS-0001 [medium/review-required] Interactive target smaller than 24x24 CSS px (.icon-btn) at a.css:1
Passing input
/* a.css */
.icon-btn { width: 44px; height: 44px; }
Result: rule did not fire
RS-A11Y-015: No main landmark#
Category: accessibility. Default severity: low. Criterion: WCAG 1.3.1, 2.4.1.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head><title>T</title><meta name="viewport" content="width=device-width"></head>
<body><p>x</p></body>
</html>
Result: RS-0001 [low/review-required] No main landmark at index.html:4
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
x
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-001 (role=img with no name): Image has no alt attribute#
Category: accessibility. Default severity: high. Criterion: WCAG 1.1.1.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<div role="img"></div>
</main>
</body>
</html>
Result: RS-0001 [high/confirmed] Element with role="img" has no accessible name at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<div role="img" aria-label="Sales chart"></div>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-013 (tailwind arbitrary hex pair): Text contrast below minimum (measured)#
Category: accessibility. Default severity: high. Criterion: WCAG 1.4.3.
Failing input
/* Card.tsx */
export const Card = () => <p className="text-[#cccccc] bg-[#ffffff]">Price</p>;
Result: RS-0001 [high/review-required] Text contrast 1.61:1 is below 4.5:1 (#cccccc on #ffffff) at Card.tsx:1
Passing input
/* Card.tsx */
export const Card = () => <p className="text-[#1a1a1a] bg-[#ffffff]">Price</p>;
Result: rule did not fire
RS-A11Y-013 (jsx style object): Text contrast below minimum (measured)#
Category: accessibility. Default severity: high. Criterion: WCAG 1.4.3.
Failing input
/* Card.tsx */
export const Card = () => <p style={{ color: "#cccccc", backgroundColor: "#ffffff" }}>Price</p>;
Result: RS-0001 [high/review-required] Text contrast 1.61:1 is below 4.5:1 (#cccccc on #ffffff) at Card.tsx:1
Passing input
/* Card.tsx */
export const Card = () => <p style={{ color: "#1a1a1a", backgroundColor: "#ffffff" }}>Price</p>;
Result: rule did not fire
RS-A11Y-013 (tailwind named colours): Text contrast below minimum (measured)#
Category: accessibility. Default severity: high. Criterion: WCAG 1.4.3.
Failing input
/* Card.tsx */
export const Card = () => <p className="text-gray-400 bg-white">Price</p>;
Result: RS-0001 [high/review-required] Text contrast 2.54:1 is below 4.5:1 (#9ca3af on #ffffff) at Card.tsx:1
Passing input
/* Card.tsx */
export const Card = () => <p className="text-gray-900 bg-white">Price</p>;
Result: rule did not fire
RS-A11Y-013 (css module file): Text contrast below minimum (measured)#
Category: accessibility. Default severity: high. Criterion: WCAG 1.4.3.
Failing input
/* button.module.css */
.price { color: #cccccc; background: #ffffff; }
Result: RS-0001 [high/confirmed] Text contrast 1.61:1 is below 4.5:1 (#cccccc on #ffffff) at button.module.css:1
Passing input
/* button.module.css */
.price { color: #1a1a1a; background: #ffffff; }
Result: rule did not fire
RS-A11Y-013 (styled-components template): Text contrast below minimum (measured)#
Category: accessibility. Default severity: high. Criterion: WCAG 1.4.3.
Failing input
/* Button.tsx */
const B = styled.button`color: #cccccc; background: #ffffff;`;
Result: RS-0001 [high/confirmed] Text contrast 1.61:1 is below 4.5:1 (#cccccc on #ffffff) at Button.tsx:2
Passing input
/* Button.tsx */
const B = styled.button`color: #1a1a1a; background: #ffffff;`;
Result: rule did not fire
RS-A11Y-016: Duplicate id#
Category: accessibility. Default severity: high. Criterion: WCAG 4.1.2, 1.3.1.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<label for="a">One</label><input id="a"><input id="a">
</main>
</body>
</html>
Result: RS-0001 [high/confirmed] Duplicate id "a" at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<label for="a">One</label><input id="a"><input id="b">
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-017: Frame has no title#
Category: accessibility. Default severity: high. Criterion: WCAG 4.1.2, 2.4.1.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<iframe src="pay.html"></iframe>
</main>
</body>
</html>
Result: RS-0001 [high/confirmed] Frame has no title at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<iframe src="pay.html" title="Payment form"></iframe>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-018: Navigation with no skip link#
Category: accessibility. Default severity: medium. Criterion: WCAG 2.4.1.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<nav><a href="/home">Home</a></nav>
</main>
</body>
</html>
Result: RS-0001 [medium/review-required] Navigation with no skip link at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<a href="#main">Skip to content</a><nav><a href="/home">Home</a></nav>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-019: Email or telephone field has no autocomplete#
Category: accessibility. Default severity: medium. Criterion: WCAG 1.3.5.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<label for="e">Email</label><input id="e" type="email">
</main>
</body>
</html>
Result: RS-0001 [medium/review-required] email field has no autocomplete attribute at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<label for="e">Email</label><input id="e" type="email" autocomplete="email">
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-020: Heading has no text#
Category: accessibility. Default severity: medium. Criterion: WCAG 2.4.6, 1.3.1.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<h2></h2>
</main>
</body>
</html>
Result: RS-0001 [medium/review-required] Heading h2 has no text at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<h2>Featured</h2>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-021: Control border contrast below 3:1#
Category: accessibility. Default severity: medium. Criterion: WCAG 1.4.11.
Failing input
/* a.css */
button { background: #ffffff; border: 1px solid #dddddd; color: #1a1a1a; }
Result: RS-0001 [medium/review-required] Control border contrast 1.36:1 is below 3:1 at a.css:1
Passing input
/* a.css */
button { background: #ffffff; border: 1px solid #767676; color: #1a1a1a; }
Result: rule did not fire
RS-A11Y-022: Empty lang on a part of the page#
Category: accessibility. Default severity: medium. Criterion: WCAG 3.1.2.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<p lang="">Bonjour</p>
</main>
</body>
</html>
Result: RS-0001 [medium/confirmed] <p> has an empty lang attribute at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<p lang="fr">Bonjour</p>
</main>
</body>
</html>
Result: rule did not fire
RS-RESP-001: No viewport meta tag#
Category: responsive. Default severity: medium. Criterion: WCAG 1.4.10.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head><title>T</title></head>
<body><main>x</main></body>
</html>
Result: RS-0001 [medium/confirmed] No viewport meta tag at index.html:3
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
x
</main>
</body>
</html>
Result: rule did not fire
RS-RESP-002: Fixed width can overflow narrow viewports#
Category: responsive. Default severity: medium. Criterion: WCAG 1.4.10.
Failing input
/* a.css */
.hero { width: 1200px; }
Result: RS-0001 [medium/review-required] Fixed width 1200px can overflow narrow viewports at a.css:1
Passing input
/* a.css */
.hero { width: 100%; max-width: 1200px; }
Result: rule did not fire
RS-RESP-003: No responsive CSS found#
Category: responsive. Default severity: medium.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
<link rel="stylesheet" href="a.css"></head>
<body>
<main>
x
</main>
</body>
</html>
/* a.css */
.a { color: #222222; }
Result: RS-0001 [medium/review-required] No responsive CSS found (media/container queries, clamp, grid auto-fit, flex-wrap) at a.css:1
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
<link rel="stylesheet" href="a.css"></head>
<body>
<main>
x
</main>
</body>
</html>
/* a.css */
.a { color: #222222; }
@media (min-width: 40rem) { .a { color: #111111; } }
Result: rule did not fire
RS-VIS-001: Very small text#
Category: visual. Default severity: low.
Failing input
/* a.css */
.legal { font-size: 10px; }
Result: RS-0001 [low/confirmed] Very small text (10px) at a.css:1
Passing input
/* a.css */
.legal { font-size: 14px; }
Result: rule did not fire
RS-PERF-001: Image without width and height#
Category: performance. Default severity: low.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<img src="a.png" alt="">
</main>
</body>
</html>
Result: RS-0001 [low/review-required] Image has no explicit width and height at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<img src="a.png" alt="" width="10" height="10">
</main>
</body>
</html>
Result: rule did not fire
RS-PERF-002: Oversized image asset#
Category: performance. Default severity: medium.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
x
</main>
</body>
</html>
/* big.png */
(binary file, 614400 bytes)
Result: RS-0001 [medium/confirmed] Image is 600 KB (budget 500 KB) at big.png
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
x
</main>
</body>
</html>
/* small.png */
(binary file, 10240 bytes)
Result: rule did not fire
RS-MOT-001: No prefers-reduced-motion handling#
Category: motion. Default severity: medium. Criterion: WCAG 2.3.3.
Failing input
/* a.css */
.fade { transition: opacity .3s; }
Result: RS-0001 [medium/confirmed] Animations or transitions exist but no prefers-reduced-motion handling at a.css:1
Passing input
/* a.css */
.fade { transition: opacity .3s; }
@media (prefers-reduced-motion: reduce) { .fade { transition: none; } }
Result: rule did not fire
RS-TOK-001: Hard-coded colours, no design tokens#
Category: design-system. Default severity: low.
Failing input
/* a.css */
.c0{border-color:#111111}
.c1{border-color:#222222}
.c2{border-color:#333333}
.c3{border-color:#444444}
.c4{border-color:#555555}
.c5{border-color:#666666}
.c6{border-color:#777777}
.c7{border-color:#888888}
.c8{border-color:#999999}
.c9{border-color:#aaaaaa}
.c10{border-color:#bbbbbb}
.c11{border-color:#cccccc}
.c12{border-color:#dddddd}
Result: RS-0001 [low/review-required] 13 distinct hard-coded colours and no CSS custom properties at a.css:1
Passing input
/* a.css */
:root { --line: #dddddd; }
.c0{border-color:#111111}
.c1{border-color:#222222}
.c2{border-color:#333333}
.c3{border-color:#444444}
.c4{border-color:#555555}
.c5{border-color:#666666}
.c6{border-color:#777777}
.c7{border-color:#888888}
.c8{border-color:#999999}
.c9{border-color:#aaaaaa}
.c10{border-color:#bbbbbb}
.c11{border-color:#cccccc}
.c12{border-color:#dddddd}
Result: rule did not fire
RS-CONT-001: Vague link text#
Category: content. Default severity: low. Criterion: WCAG 2.4.4.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<a href="/pricing">click here</a>
</main>
</body>
</html>
Result: RS-0001 [low/confirmed] Vague link text "click here" at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<a href="/pricing">See pricing plans</a>
</main>
</body>
</html>
Result: rule did not fire
RS-CONT-002: Placeholder text present#
Category: content. Default severity: low.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<p>Lorem ipsum dolor sit amet</p>
</main>
</body>
</html>
Result: RS-0001 [low/confirmed] Placeholder text present at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<p>Our team ships weekly.</p>
</main>
</body>
</html>
Result: rule did not fire
RS-TRUST-001: Urgency or scarcity wording needs review#
Category: trust. Default severity: info.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<p>Hurry! Only 3 left in stock.</p>
</main>
</body>
</html>
Result: RS-0001 [info/review-required] Urgency or scarcity wording needs review at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<p>In stock.</p>
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-002 (empty lang value): Document has no lang attribute#
Category: accessibility. Default severity: medium. Criterion: WCAG 3.1.1.
Failing input
/* index.html */
<!doctype html>
<html lang="">
<head><title>T</title><meta name="viewport" content="width=device-width"></head>
<body><main>x</main></body>
</html>
Result: RS-0001 [medium/confirmed] Document has no lang attribute at index.html:2
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
x
</main>
</body>
</html>
Result: rule did not fire
RS-A11Y-008 (document without a head element): Document has no title#
Category: accessibility. Default severity: medium. Criterion: WCAG 2.4.2.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<h1>No title anywhere</h1>
</html>
Result: RS-0001 [medium/confirmed] Document has no title at index.html:2
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<title>Has a title</title>
<h1>Hello</h1>
</html>
Result: rule did not fire
RS-A11Y-004 (link whose only content is an empty-alt image): Button or link has no accessible name#
Category: accessibility. Default severity: high. Criterion: WCAG 4.1.2, 2.4.4.
Failing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<a href="/w3c"><img src="a.png" alt="" width="10" height="10"></a>
</main>
</body>
</html>
Result: RS-0001 [high/review-required] Link has no accessible name at index.html:10
Passing input
/* index.html */
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>T</title>
</head>
<body>
<main>
<a href="/w3c"><img src="a.png" alt="W3C home" width="10" height="10"></a>
</main>
</body>
</html>
Result: rule did not fire
Guards against false positives#
These inputs look suspicious but are correct. The rule must stay silent.
RS-A11Y-001: prop spread may supply alt. Result: silent (correct)RS-A11Y-005: input wrapped by label. Result: silent (correct)RS-A11Y-005: hidden and submit inputs need no label. Result: silent (correct)RS-A11Y-007: div with role and tabindex. Result: silent (correct)RS-A11Y-010: outline none on :focus-visible replacement. Result: silent (correct)RS-A11Y-013: large text uses 3:1 threshold. Result: silent (correct)RS-A11Y-013: exactly passing ratio 4.54:1. Result: silent (correct)RS-RESP-002: width with max-width in same rule. Result: silent (correct)RS-CONT-001: descriptive link text containing the word here. Result: silent (correct)RS-MOT-001: no animation at all. Result: silent (correct)RS-A11Y-004: button with text. Result: silent (correct)RS-A11Y-001: img named by title is not reported (ACT 23a2a8 passed example). Result: silent (correct)RS-A11Y-001: img hidden from the accessibility tree. Result: silent (correct)RS-A11Y-001: role=img hidden from the accessibility tree. Result: silent (correct)RS-A11Y-016: id inside a code sample. Result: silent (correct)RS-A11Y-004: hidden button is not rendered. Result: silent (correct)RS-A11Y-013: text-shadow changes effective contrast, so the pair is not judged. Result: silent (correct)RS-A11Y-004: name supplied at runtime by data-l10n-id. Result: silent (correct)RS-A11Y-005: file input nested in a labelled button. Result: silent (correct)RS-A11Y-008: title may come from a template include. Result: silent (correct)RS-A11Y-002: <html> inside a code sample is not a document. Result: silent (correct)RS-A11Y-010: :active selector is not a focus style. Result: silent (correct)RS-A11Y-010: comment before a nested SCSS selector is not part of the selector. Result: silent (correct)RS-A11Y-014: pseudo-element is not an interactive target. Result: silent (correct)RS-A11Y-014: icon inside a larger control. Result: silent (correct)RS-A11Y-015: main may live in the template content. Result: silent (correct)RS-A11Y-015: fragment without html or head is not a document. Result: silent (correct)RS-A11Y-004: button named by a label for=id. Result: silent (correct)RS-A11Y-010: SCSS interpolation does not hide an :active selector. Result: silent (correct)RS-A11Y-014: spacer element is not interactive. Result: silent (correct)