Skip to content

Commit

Permalink
Merge pull request #796 from markwoon/master
Browse files Browse the repository at this point in the history
Support img role for canvas. Fix for #648.
  • Loading branch information
jessebeach committed Jun 13, 2021
2 parents 36102cd + 55e5c11 commit 2ebb1ad
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 2ebb1ad

Please sign in to comment.