Skip to content

Commit

Permalink
[Fix] no-redundant-roles, role-supports-aria-props: Remove implic…
Browse files Browse the repository at this point in the history
…it 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
  • Loading branch information
uncommon-type authored and ljharb committed Apr 15, 2022
1 parent f6ba03c commit ce2c328
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions __tests__/src/rules/no-redundant-roles-test.js
Expand Up @@ -77,6 +77,7 @@ ruleTester.run(`${ruleName}:recommended (valid list role override)`, rule, {
valid: [
{ code: '<ul role="list" />' },
{ code: '<ol role="list" />' },
{ code: '<dl role="list" />' },
]
.map(ruleOptionsMapperFactory(listException))
.map(parserOptionsMapper),
Expand Down
4 changes: 0 additions & 4 deletions __tests__/src/rules/role-supports-aria-props-test.js
Expand Up @@ -432,10 +432,6 @@ ruleTester.run('role-supports-aria-props', rule, {
code: '<dialog aria-expanded />',
errors: [errorMessage('aria-expanded', 'dialog', 'dialog', true)],
},
{
code: '<dl aria-expanded />',
errors: [errorMessage('aria-expanded', 'list', 'dl', true)],
},
{
code: '<aside aria-expanded />',
errors: [errorMessage('aria-expanded', 'complementary', 'aside', true)],
Expand Down
6 changes: 0 additions & 6 deletions src/util/implicitRoles/dl.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/util/implicitRoles/index.js
Expand Up @@ -7,7 +7,6 @@ import button from './button';
import datalist from './datalist';
import details from './details';
import dialog from './dialog';
import dl from './dl';
import form from './form';
import h1 from './h1';
import h2 from './h2';
Expand Down Expand Up @@ -46,7 +45,6 @@ export default {
datalist,
details,
dialog,
dl,
form,
h1,
h2,
Expand Down

0 comments on commit ce2c328

Please sign in to comment.