mirror of https://github.com/sveltejs/svelte
[feat] add a11y check on abstract roles (#6241)
* add a11y check on abstract roles * use aria-query and move warnings to compiler_warnings file * uppercase warning message Co-authored-by: tanhauhau <lhtan93@gmail.com>pull/7679/head
parent
ccbf10c163
commit
f5111ef436
@ -0,0 +1,12 @@
|
|||||||
|
<div role="command"/>
|
||||||
|
<div role="composite"/>
|
||||||
|
<div role="input"/>
|
||||||
|
<div role="landmark"/>
|
||||||
|
<div role="range"/>
|
||||||
|
<div role="roletype"/>
|
||||||
|
<div role="section"/>
|
||||||
|
<div role="sectionhead"/>
|
||||||
|
<div role="select"/>
|
||||||
|
<div role="structure"/>
|
||||||
|
<div role="widget"/>
|
||||||
|
<div role="window"/>
|
@ -0,0 +1,182 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 19,
|
||||||
|
"column": 19,
|
||||||
|
"line": 1
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'command' is forbidden",
|
||||||
|
"pos": 5,
|
||||||
|
"start": {
|
||||||
|
"character": 5,
|
||||||
|
"column": 5,
|
||||||
|
"line": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 43,
|
||||||
|
"column": 21,
|
||||||
|
"line": 2
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'composite' is forbidden",
|
||||||
|
"pos": 27,
|
||||||
|
"start": {
|
||||||
|
"character": 27,
|
||||||
|
"column": 5,
|
||||||
|
"line": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 63,
|
||||||
|
"column": 17,
|
||||||
|
"line": 3
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'input' is forbidden",
|
||||||
|
"pos": 51,
|
||||||
|
"start": {
|
||||||
|
"character": 51,
|
||||||
|
"column": 5,
|
||||||
|
"line": 3
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 86,
|
||||||
|
"column": 20,
|
||||||
|
"line": 4
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'landmark' is forbidden",
|
||||||
|
"pos": 71,
|
||||||
|
"start": {
|
||||||
|
"character": 71,
|
||||||
|
"column": 5,
|
||||||
|
"line": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 106,
|
||||||
|
"column": 17,
|
||||||
|
"line": 5
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'range' is forbidden",
|
||||||
|
"pos": 94,
|
||||||
|
"start": {
|
||||||
|
"character": 94,
|
||||||
|
"column": 5,
|
||||||
|
"line": 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 129,
|
||||||
|
"column": 20,
|
||||||
|
"line": 6
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'roletype' is forbidden",
|
||||||
|
"pos": 114,
|
||||||
|
"start": {
|
||||||
|
"character": 114,
|
||||||
|
"column": 5,
|
||||||
|
"line": 6
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 151,
|
||||||
|
"column": 19,
|
||||||
|
"line": 7
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'section' is forbidden",
|
||||||
|
"pos": 137,
|
||||||
|
"start": {
|
||||||
|
"character": 137,
|
||||||
|
"column": 5,
|
||||||
|
"line": 7
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 177,
|
||||||
|
"column": 23,
|
||||||
|
"line": 8
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'sectionhead' is forbidden",
|
||||||
|
"pos": 159,
|
||||||
|
"start": {
|
||||||
|
"character": 159,
|
||||||
|
"column": 5,
|
||||||
|
"line": 8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 198,
|
||||||
|
"column": 18,
|
||||||
|
"line": 9
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'select' is forbidden",
|
||||||
|
"pos": 185,
|
||||||
|
"start": {
|
||||||
|
"character": 185,
|
||||||
|
"column": 5,
|
||||||
|
"line": 9
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 222,
|
||||||
|
"column": 21,
|
||||||
|
"line": 10
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'structure' is forbidden",
|
||||||
|
"pos": 206,
|
||||||
|
"start": {
|
||||||
|
"character": 206,
|
||||||
|
"column": 5,
|
||||||
|
"line": 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 243,
|
||||||
|
"column": 18,
|
||||||
|
"line": 11
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'widget' is forbidden",
|
||||||
|
"pos": 230,
|
||||||
|
"start": {
|
||||||
|
"character": 230,
|
||||||
|
"column": 5,
|
||||||
|
"line": 11
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "a11y-no-abstract-role",
|
||||||
|
"end": {
|
||||||
|
"character": 264,
|
||||||
|
"column": 18,
|
||||||
|
"line": 12
|
||||||
|
},
|
||||||
|
"message": "A11y: Abstract role 'window' is forbidden",
|
||||||
|
"pos": 251,
|
||||||
|
"start": {
|
||||||
|
"character": 251,
|
||||||
|
"column": 5,
|
||||||
|
"line": 12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
Loading…
Reference in new issue