Skip to content

Commit

Permalink
Support img role for canvas. Fix for #648.
Browse files Browse the repository at this point in the history
  • Loading branch information
markwoon committed May 26, 2021
1 parent 36102cd commit 55e5c11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Expand Up @@ -368,6 +368,7 @@ ruleTester.run(`${ruleName}:recommended`, rule, {
valid: [
...alwaysValid,
{ code: '<tr role="presentation" />;' },
{ code: '<canvas role="img" />;' },
{ code: '<Component role="presentation" />;' },
]
.map(ruleOptionsMapperFactory(recommendedOptions))
Expand All @@ -386,5 +387,6 @@ ruleTester.run(`${ruleName}:strict`, rule, {
invalid: [
...neverValid,
{ code: '<tr role="presentation" />;', errors: [expectedError] },
{ code: '<canvas role="img" />;', errors: [expectedError] },
].map(parserOptionsMapper),
});
1 change: 1 addition & 0 deletions src/index.js
Expand Up @@ -118,6 +118,7 @@ module.exports = {
'error',
{
tr: ['none', 'presentation'],
canvas: ['img'],
},
],
'jsx-a11y/no-noninteractive-element-interactions': [
Expand Down

0 comments on commit 55e5c11

Please sign in to comment.