Skip to content

Commit 6bc9ac2

Browse files
committed
test(template-require-mandatory-role-attributes): absorb audit-fixture cases, drop audit fixture
Upstream maintainers don't want the per-PR `tests/audit/peer-parity` pattern. Port the documented divergences from peer plugins (jsx-a11y, vue-a11y, angular-eslint) into the regular suite as VALID cases that pin our current behavior: - `role="combobox listbox"` (space-separated tokens — peers split, we don't) - `role="COMBOBOX"` / `role="SLIDER"` (case-insensitivity — peers lowercase before lookup, we don't) - `role="foobar"` (unknown — parity) Other audit cases were already covered by the regular tests or were pure peer-plugin restatements.
1 parent dc9c881 commit 6bc9ac2

2 files changed

Lines changed: 12 additions & 215 deletions

File tree

tests/audit/role-has-required-aria/peer-parity.js

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

tests/lib/rules/template-require-mandatory-role-attributes.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ ruleTester.run('template-require-mandatory-role-attributes', rule, {
4444
'<template>{{input type="checkbox" role="switch"}}</template>',
4545
'<template>{{input type="Checkbox" role="switch"}}</template>',
4646
'<template>{{input type="range" role="slider"}}</template>',
47+
48+
// Documented divergences from jsx-a11y / vue-a11y / angular-eslint:
49+
// - Space-separated role tokens: peers split on whitespace and require
50+
// attrs for each token. We pass the whole string to aria-query, so
51+
// `role="combobox listbox"` lookup misses → no flag. (Case below.)
52+
// - Case-folding role values: peers lowercase before lookup; we don't.
53+
// `role="COMBOBOX"` similarly misses lookup → no flag.
54+
// - Unknown role: all plugins skip — parity, captured for completeness.
55+
'<template><div role="combobox listbox" /></template>',
56+
'<template><div role="COMBOBOX" /></template>',
57+
'<template><div role="SLIDER" /></template>',
58+
'<template><div role="foobar" /></template>',
4759
],
4860

4961
invalid: [

0 commit comments

Comments
 (0)