Skip to content

Commit ce2c328

Browse files
uncommon-typeljharb
authored andcommittedApr 15, 2022
[Fix] no-redundant-roles, role-supports-aria-props: Remove implicit role from dl element
- Add a valid test case indicating `list` as a valid role for dl - Remove dl import and export from implicitRoles` index.js file - Remove dl.js form implicitRoles folder Fixes #847
1 parent f6ba03c commit ce2c328

File tree

4 files changed

+1
-12
lines changed

4 files changed

+1
-12
lines changed
 

‎__tests__/src/rules/no-redundant-roles-test.js

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ ruleTester.run(`${ruleName}:recommended (valid list role override)`, rule, {
7777
valid: [
7878
{ code: '<ul role="list" />' },
7979
{ code: '<ol role="list" />' },
80+
{ code: '<dl role="list" />' },
8081
]
8182
.map(ruleOptionsMapperFactory(listException))
8283
.map(parserOptionsMapper),

‎__tests__/src/rules/role-supports-aria-props-test.js

-4
Original file line numberDiff line numberDiff line change
@@ -432,10 +432,6 @@ ruleTester.run('role-supports-aria-props', rule, {
432432
code: '<dialog aria-expanded />',
433433
errors: [errorMessage('aria-expanded', 'dialog', 'dialog', true)],
434434
},
435-
{
436-
code: '<dl aria-expanded />',
437-
errors: [errorMessage('aria-expanded', 'list', 'dl', true)],
438-
},
439435
{
440436
code: '<aside aria-expanded />',
441437
errors: [errorMessage('aria-expanded', 'complementary', 'aside', true)],

‎src/util/implicitRoles/dl.js

-6
This file was deleted.

‎src/util/implicitRoles/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import button from './button';
77
import datalist from './datalist';
88
import details from './details';
99
import dialog from './dialog';
10-
import dl from './dl';
1110
import form from './form';
1211
import h1 from './h1';
1312
import h2 from './h2';
@@ -46,7 +45,6 @@ export default {
4645
datalist,
4746
details,
4847
dialog,
49-
dl,
5048
form,
5149
h1,
5250
h2,

0 commit comments

Comments
 (0)
Please sign in to comment.