Skip to content

Commit 29ead03

Browse files
add test
1 parent b05b0cb commit 29ead03

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

tests/a11y-no-title-attribute.js

+3-12
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ ruleTester.run('a11y-no-title-attribute', rule, {
3030
},
3131
},
3232
{
33-
// Note: we are only checking semantic elements. We cannot make assumptions about how a React Components is using the title prop.
3433
code: '<Link title="some title">Submit</Link>',
3534
settings: {
3635
github: {
@@ -40,20 +39,12 @@ ruleTester.run('a11y-no-title-attribute', rule, {
4039
},
4140
},
4241
},
42+
{ // Note: we are only checking semantic elements. We cannot make assumptions about how a React Components is using the title prop.
43+
code: '<Link as="a" title="some title">Submit</Link>',
44+
},
4345
],
4446
invalid: [
4547
{code: '<a title="some title" href="github.com">GitHub</a>', errors: [{message: errorMessage}]},
4648
{code: '<span><button title="some title">submit</button></span>', errors: [{message: errorMessage}]},
47-
{
48-
code: '<Component as="a" title="some title">Submit</Component>',
49-
errors: [{message: errorMessage}],
50-
settings: {
51-
github: {
52-
components: {
53-
Component: 'iframe',
54-
},
55-
},
56-
},
57-
},
5849
],
5950
})

0 commit comments

Comments
 (0)