Skip to content

Commit 6101f28

Browse files
committed
test(template-require-valid-alt-text): absorb audit-fixture cases, drop audit fixture
Upstream maintainers don't want the per-PR `tests/audit/peer-parity` pattern. Port one case that pinned distinct behavior: - `<img alt=" " />` as VALID — whitespace-only alt is currently treated as decorative; jsx-a11y agrees. All other audit cases were already covered by the regular tests on this branch (extensive existing coverage of object/area/input variants, empty aria-label/labelledby, presentation-role conflicts, etc).
1 parent 67de7c7 commit 6101f28

2 files changed

Lines changed: 3 additions & 199 deletions

File tree

tests/audit/alt-text/peer-parity.js

Lines changed: 0 additions & 199 deletions
This file was deleted.

tests/lib/rules/template-require-valid-alt-text.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ ruleTester.run('template-require-valid-alt-text', rule, {
1212
'<template><img alt="Company branding" src="/logo.png" /></template>',
1313
'<template><img alt="" src="/decorative.png" /></template>',
1414
'<template><img hidden alt="" /></template>',
15+
// Whitespace-only alt — pin our current behavior. Peer plugins
16+
// (jsx-a11y) accept this; we don't trim before considering "empty alt".
17+
'<template><img alt=" " /></template>',
1518

1619
'<template><img alt="hullo"></template>',
1720
'<template><img alt={{foo}}></template>',

0 commit comments

Comments
 (0)