Skip to content

Commit

Permalink
Update test for implicit role of img
Browse files Browse the repository at this point in the history
  • Loading branch information
othree committed Nov 26, 2018
1 parent f484ce3 commit 477966f
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions __tests__/src/rules/role-supports-aria-props-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,8 @@ ruleTester.run('role-supports-aria-props', rule, {
// this will have global
{ code: '<link aria-checked />' },

// IMG TESTS - implicit role is `presentation`
{ code: '<img alt="" aria-atomic />' },
{ code: '<img alt="" aria-busy />' },
{ code: '<img alt="" aria-controls />' },
{ code: '<img alt="" aria-describedby />' },
{ code: '<img alt="" aria-disabled />' },
{ code: '<img alt="" aria-dropeffect />' },
{ code: '<img alt="" aria-flowto />' },
{ code: '<img alt="" aria-grabbed />' },
{ code: '<img alt="" aria-haspopup />' },
{ code: '<img alt="" aria-hidden />' },
{ code: '<img alt="" aria-invalid />' },
{ code: '<img alt="" aria-label />' },
{ code: '<img alt="" aria-labelledby />' },
{ code: '<img alt="" aria-live />' },
{ code: '<img alt="" aria-owns />' },
{ code: '<img alt="" aria-relevant />' },
// IMG TESTS - no implicit role
{ code: '<img alt="" aria-checked />' },

// this will have role of `img`
{ code: '<img alt="foobar" aria-busy />' },
Expand Down Expand Up @@ -444,8 +429,8 @@ ruleTester.run('role-supports-aria-props', rule, {
errors: [errorMessage('aria-checked', 'link', 'link', true)],
},
{
code: '<img alt="" aria-checked />',
errors: [errorMessage('aria-checked', 'presentation', 'img', true)],
code: '<img alt="foobar" aria-checked />',
errors: [errorMessage('aria-checked', 'img', 'img', true)],
},
{
code: '<menu type="toolbar" aria-checked />',
Expand Down

0 comments on commit 477966f

Please sign in to comment.