Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kendallgassner committed Jul 17, 2023
1 parent b05b0cb commit 29ead03
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions tests/a11y-no-title-attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ ruleTester.run('a11y-no-title-attribute', rule, {
},
},
{
// Note: we are only checking semantic elements. We cannot make assumptions about how a React Components is using the title prop.
code: '<Link title="some title">Submit</Link>',
settings: {
github: {
Expand All @@ -40,20 +39,12 @@ ruleTester.run('a11y-no-title-attribute', rule, {
},
},
},
{ // Note: we are only checking semantic elements. We cannot make assumptions about how a React Components is using the title prop.
code: '<Link as="a" title="some title">Submit</Link>',
},
],
invalid: [
{code: '<a title="some title" href="github.com">GitHub</a>', errors: [{message: errorMessage}]},
{code: '<span><button title="some title">submit</button></span>', errors: [{message: errorMessage}]},
{
code: '<Component as="a" title="some title">Submit</Component>',
errors: [{message: errorMessage}],
settings: {
github: {
components: {
Component: 'iframe',
},
},
},
},
],
})

0 comments on commit 29ead03

Please sign in to comment.