mirror of https://github.com/sveltejs/svelte
[feat] check noninteractive roles on interactive elements (#5955)
* check noninteractive roles on interactive elements * refactor to match the eslint-plugin-jsx-a11y implementation * update test case Co-authored-by: tanhauhau <lhtan93@gmail.com>pull/7697/head
parent
9f3625a7b8
commit
b517df14e4
@ -0,0 +1,137 @@
|
||||
import {
|
||||
ARIARoleDefintionKey,
|
||||
roles as roles_map,
|
||||
elementRoles,
|
||||
ARIARoleRelationConcept
|
||||
} from 'aria-query';
|
||||
import { AXObjects, elementAXObjects } from 'axobject-query';
|
||||
import Attribute from '../nodes/Attribute';
|
||||
|
||||
const roles = [...roles_map.keys()];
|
||||
|
||||
const non_interactive_roles = new Set(
|
||||
roles
|
||||
.filter((name) => {
|
||||
const role = roles_map.get(name);
|
||||
return (
|
||||
!roles_map.get(name).abstract &&
|
||||
// 'toolbar' does not descend from widget, but it does support
|
||||
// aria-activedescendant, thus in practice we treat it as a widget.
|
||||
name !== 'toolbar' &&
|
||||
!role.superClass.some((classes) => classes.includes('widget'))
|
||||
);
|
||||
})
|
||||
.concat(
|
||||
// The `progressbar` is descended from `widget`, but in practice, its
|
||||
// value is always `readonly`, so we treat it as a non-interactive role.
|
||||
'progressbar'
|
||||
)
|
||||
);
|
||||
|
||||
const interactive_roles = new Set(
|
||||
roles
|
||||
.filter((name) => {
|
||||
const role = roles_map.get(name);
|
||||
return (
|
||||
!role.abstract &&
|
||||
// The `progressbar` is descended from `widget`, but in practice, its
|
||||
// value is always `readonly`, so we treat it as a non-interactive role.
|
||||
name !== 'progressbar' &&
|
||||
role.superClass.some((classes) => classes.includes('widget'))
|
||||
);
|
||||
})
|
||||
.concat(
|
||||
// 'toolbar' does not descend from widget, but it does support
|
||||
// aria-activedescendant, thus in practice we treat it as a widget.
|
||||
'toolbar'
|
||||
)
|
||||
);
|
||||
|
||||
export function is_non_interactive_roles(role: ARIARoleDefintionKey) {
|
||||
return non_interactive_roles.has(role);
|
||||
}
|
||||
|
||||
const presentation_roles = new Set(['presentation', 'none']);
|
||||
|
||||
export function is_presentation_role(role: ARIARoleDefintionKey) {
|
||||
return presentation_roles.has(role);
|
||||
}
|
||||
|
||||
const non_interactive_element_role_schemas: ARIARoleRelationConcept[] = [];
|
||||
|
||||
elementRoles.entries().forEach(([schema, roles]) => {
|
||||
if ([...roles].every((role) => non_interactive_roles.has(role))) {
|
||||
non_interactive_element_role_schemas.push(schema);
|
||||
}
|
||||
});
|
||||
|
||||
const interactive_element_role_schemas: ARIARoleRelationConcept[] = [];
|
||||
|
||||
elementRoles.entries().forEach(([schema, roles]) => {
|
||||
if ([...roles].every((role) => interactive_roles.has(role))) {
|
||||
interactive_element_role_schemas.push(schema);
|
||||
}
|
||||
});
|
||||
|
||||
const interactive_ax_objects = new Set(
|
||||
[...AXObjects.keys()].filter((name) => AXObjects.get(name).type === 'widget')
|
||||
);
|
||||
|
||||
const interactive_element_ax_object_schemas: ARIARoleRelationConcept[] = [];
|
||||
|
||||
elementAXObjects.entries().forEach(([schema, ax_object]) => {
|
||||
if ([...ax_object].every((role) => interactive_ax_objects.has(role))) {
|
||||
interactive_element_ax_object_schemas.push(schema);
|
||||
}
|
||||
});
|
||||
|
||||
function match_schema(
|
||||
schema: ARIARoleRelationConcept,
|
||||
tag_name: string,
|
||||
attribute_map: Map<string, Attribute>
|
||||
) {
|
||||
if (schema.name !== tag_name) return false;
|
||||
if (!schema.attributes) return true;
|
||||
return schema.attributes.every((schema_attribute) => {
|
||||
const attribute = attribute_map.get(schema_attribute.name);
|
||||
if (!attribute) return false;
|
||||
if (
|
||||
schema_attribute.value &&
|
||||
schema_attribute.value !== attribute.get_static_value()
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
export function is_interactive_element(
|
||||
tag_name: string,
|
||||
attribute_map: Map<string, Attribute>
|
||||
): boolean {
|
||||
if (
|
||||
interactive_element_role_schemas.some((schema) =>
|
||||
match_schema(schema, tag_name, attribute_map)
|
||||
)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
non_interactive_element_role_schemas.some((schema) =>
|
||||
match_schema(schema, tag_name, attribute_map)
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
interactive_element_ax_object_schemas.some((schema) =>
|
||||
match_schema(schema, tag_name, attribute_map)
|
||||
)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
@ -0,0 +1,150 @@
|
||||
<!-- a -->
|
||||
<a href="test" role="article">link</a>
|
||||
<a href="test" role="banner">link</a>
|
||||
<a href="test" role="complementary">link</a>
|
||||
<a href="test" role="img">link</a>
|
||||
<a href="test" role="listitem">link</a>
|
||||
<a href="test" role="main">link</a>
|
||||
<a href="test" role="region">link</a>
|
||||
<a href="test" role="tooltip">link</a>
|
||||
<a href="test" role="button">link</a>
|
||||
|
||||
<!-- button -->
|
||||
<button role="article">button</button>
|
||||
<button role="banner">button</button>
|
||||
<button role="complementary">button</button>
|
||||
<button role="img">button</button>
|
||||
<button role="listitem">button</button>
|
||||
<button role="main">button</button>
|
||||
<button role="region">button</button>
|
||||
<button role="tooltip">button</button>
|
||||
<button role="button">button</button>
|
||||
|
||||
<!-- input -->
|
||||
<input role="article"/>
|
||||
<input role="banner"/>
|
||||
<input role="complementary"/>
|
||||
<input role="img"/>
|
||||
<input role="listitem"/>
|
||||
<input role="main"/>
|
||||
<input role="region"/>
|
||||
<input role="tooltip"/>
|
||||
<input role="button"/>
|
||||
|
||||
<!-- select -->
|
||||
<select role="article"/>
|
||||
<select role="banner"/>
|
||||
<select role="complementary"/>
|
||||
<select role="img"/>
|
||||
<select role="listitem"/>
|
||||
<select role="main"/>
|
||||
<select role="region"/>
|
||||
<select role="tooltip"/>
|
||||
<select role="button"/>
|
||||
|
||||
<!-- textarea -->
|
||||
<textarea role="article"/>
|
||||
<textarea role="banner"/>
|
||||
<textarea role="complementary"/>
|
||||
<textarea role="img"/>
|
||||
<textarea role="listitem"/>
|
||||
<textarea role="main"/>
|
||||
<textarea role="region"/>
|
||||
<textarea role="tooltip"/>
|
||||
<textarea role="button"/>
|
||||
|
||||
<!-- HTML elements attributed with an abstract role -->
|
||||
<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="tablist" />
|
||||
<div role="toolbar" />
|
||||
<div role="tree" />
|
||||
<div role="treegrid" />
|
||||
<div role="widget" />
|
||||
<div role="window" />
|
||||
|
||||
<!-- HTML elements with an inherent, non-interactive role, assigned an interactive role. -->
|
||||
<main role="button" />
|
||||
<area role="button" alt="x" />
|
||||
<article role="button" />
|
||||
<article role="button" />
|
||||
<dd role="button" />
|
||||
<dfn role="button" />
|
||||
<dt role="button" />
|
||||
<fieldset role="button" />
|
||||
<figure role="button" />
|
||||
<form role="button" />
|
||||
<frame role="button" />
|
||||
<h1 role="button">title</h1>
|
||||
<h2 role="button">title</h2>
|
||||
<h3 role="button">title</h3>
|
||||
<h4 role="button">title</h4>
|
||||
<h5 role="button">title</h5>
|
||||
<h6 role="button">title</h6>
|
||||
<hr role="button" />
|
||||
<img role="button" alt="x" />
|
||||
<li role="button" />
|
||||
<li role="presentation" />
|
||||
<nav role="button" />
|
||||
<ol role="button" />
|
||||
<table role="button" />
|
||||
<tbody role="button" />
|
||||
<td role="button" />
|
||||
<tfoot role="button" />
|
||||
<thead role="button" />
|
||||
<ul role="button" />
|
||||
|
||||
<!-- HTML elements attributed with a non-interactive role -->
|
||||
<div role="alert" />
|
||||
<div role="alertdialog" />
|
||||
<div role="application" />
|
||||
<div role="article" />
|
||||
<div role="banner" />
|
||||
<div role="cell" />
|
||||
<div role="complementary" />
|
||||
<div role="contentinfo" />
|
||||
<div role="definition" />
|
||||
<div role="dialog" />
|
||||
<div role="directory" />
|
||||
<div role="document" />
|
||||
<div role="feed" />
|
||||
<div role="figure" />
|
||||
<div role="form" />
|
||||
<div role="group" />
|
||||
<div role="heading" aria-level="1" />
|
||||
<div role="img" />
|
||||
<div role="list" />
|
||||
<div role="listitem" />
|
||||
<div role="log" />
|
||||
<div role="main" />
|
||||
<div role="marquee" />
|
||||
<div role="math" />
|
||||
<div role="navigation" />
|
||||
<div role="note" />
|
||||
<div role="region" />
|
||||
<div role="rowgroup" />
|
||||
<div role="search" />
|
||||
<div role="separator" />
|
||||
<div role="scrollbar" aria-controls="x" aria-valuenow="0" />
|
||||
<div role="status" />
|
||||
<div role="table" />
|
||||
<div role="tabpanel" />
|
||||
<div role="term" />
|
||||
<div role="timer" />
|
||||
<div role="tooltip" />
|
||||
|
||||
<!-- not valid -->
|
||||
<menuitem role="listitem" />
|
||||
<option class="foo" role="listitem" />
|
||||
<select class="foo" role="listitem" />
|
||||
<summary role="listitem" />
|
||||
<textarea class="foo" role="listitem" />
|
||||
<tr role="listitem" />
|
@ -0,0 +1,887 @@
|
||||
[
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 49,
|
||||
"column": 38,
|
||||
"line": 2
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'article'",
|
||||
"pos": 11,
|
||||
"start": {
|
||||
"character": 11,
|
||||
"column": 0,
|
||||
"line": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 87,
|
||||
"column": 37,
|
||||
"line": 3
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'banner'",
|
||||
"pos": 50,
|
||||
"start": {
|
||||
"character": 50,
|
||||
"column": 0,
|
||||
"line": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 132,
|
||||
"column": 44,
|
||||
"line": 4
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'complementary'",
|
||||
"pos": 88,
|
||||
"start": {
|
||||
"character": 88,
|
||||
"column": 0,
|
||||
"line": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 167,
|
||||
"column": 34,
|
||||
"line": 5
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'img'",
|
||||
"pos": 133,
|
||||
"start": {
|
||||
"character": 133,
|
||||
"column": 0,
|
||||
"line": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 207,
|
||||
"column": 39,
|
||||
"line": 6
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'listitem'",
|
||||
"pos": 168,
|
||||
"start": {
|
||||
"character": 168,
|
||||
"column": 0,
|
||||
"line": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 243,
|
||||
"column": 35,
|
||||
"line": 7
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'main'",
|
||||
"pos": 208,
|
||||
"start": {
|
||||
"character": 208,
|
||||
"column": 0,
|
||||
"line": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 281,
|
||||
"column": 37,
|
||||
"line": 8
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'region'",
|
||||
"pos": 244,
|
||||
"start": {
|
||||
"character": 244,
|
||||
"column": 0,
|
||||
"line": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 320,
|
||||
"column": 38,
|
||||
"line": 9
|
||||
},
|
||||
"message": "A11y: <a> cannot have role 'tooltip'",
|
||||
"pos": 282,
|
||||
"start": {
|
||||
"character": 282,
|
||||
"column": 0,
|
||||
"line": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 414,
|
||||
"column": 38,
|
||||
"line": 13
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'article'",
|
||||
"pos": 376,
|
||||
"start": {
|
||||
"character": 376,
|
||||
"column": 0,
|
||||
"line": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 452,
|
||||
"column": 37,
|
||||
"line": 14
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'banner'",
|
||||
"pos": 415,
|
||||
"start": {
|
||||
"character": 415,
|
||||
"column": 0,
|
||||
"line": 14
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 497,
|
||||
"column": 44,
|
||||
"line": 15
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'complementary'",
|
||||
"pos": 453,
|
||||
"start": {
|
||||
"character": 453,
|
||||
"column": 0,
|
||||
"line": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 532,
|
||||
"column": 34,
|
||||
"line": 16
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'img'",
|
||||
"pos": 498,
|
||||
"start": {
|
||||
"character": 498,
|
||||
"column": 0,
|
||||
"line": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 572,
|
||||
"column": 39,
|
||||
"line": 17
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'listitem'",
|
||||
"pos": 533,
|
||||
"start": {
|
||||
"character": 533,
|
||||
"column": 0,
|
||||
"line": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 608,
|
||||
"column": 35,
|
||||
"line": 18
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'main'",
|
||||
"pos": 573,
|
||||
"start": {
|
||||
"character": 573,
|
||||
"column": 0,
|
||||
"line": 18
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 646,
|
||||
"column": 37,
|
||||
"line": 19
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'region'",
|
||||
"pos": 609,
|
||||
"start": {
|
||||
"character": 609,
|
||||
"column": 0,
|
||||
"line": 19
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 685,
|
||||
"column": 38,
|
||||
"line": 20
|
||||
},
|
||||
"message": "A11y: <button> cannot have role 'tooltip'",
|
||||
"pos": 647,
|
||||
"start": {
|
||||
"character": 647,
|
||||
"column": 0,
|
||||
"line": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-redundant-roles",
|
||||
"end": {
|
||||
"character": 707,
|
||||
"column": 21,
|
||||
"line": 21
|
||||
},
|
||||
"message": "A11y: Redundant role 'button'",
|
||||
"pos": 694,
|
||||
"start": {
|
||||
"character": 694,
|
||||
"column": 8,
|
||||
"line": 21
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 763,
|
||||
"column": 23,
|
||||
"line": 24
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'article'",
|
||||
"pos": 740,
|
||||
"start": {
|
||||
"character": 740,
|
||||
"column": 0,
|
||||
"line": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 786,
|
||||
"column": 22,
|
||||
"line": 25
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'banner'",
|
||||
"pos": 764,
|
||||
"start": {
|
||||
"character": 764,
|
||||
"column": 0,
|
||||
"line": 25
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 816,
|
||||
"column": 29,
|
||||
"line": 26
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'complementary'",
|
||||
"pos": 787,
|
||||
"start": {
|
||||
"character": 787,
|
||||
"column": 0,
|
||||
"line": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 836,
|
||||
"column": 19,
|
||||
"line": 27
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'img'",
|
||||
"pos": 817,
|
||||
"start": {
|
||||
"character": 817,
|
||||
"column": 0,
|
||||
"line": 27
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 861,
|
||||
"column": 24,
|
||||
"line": 28
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'listitem'",
|
||||
"pos": 837,
|
||||
"start": {
|
||||
"character": 837,
|
||||
"column": 0,
|
||||
"line": 28
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 882,
|
||||
"column": 20,
|
||||
"line": 29
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'main'",
|
||||
"pos": 862,
|
||||
"start": {
|
||||
"character": 862,
|
||||
"column": 0,
|
||||
"line": 29
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 905,
|
||||
"column": 22,
|
||||
"line": 30
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'region'",
|
||||
"pos": 883,
|
||||
"start": {
|
||||
"character": 883,
|
||||
"column": 0,
|
||||
"line": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 929,
|
||||
"column": 23,
|
||||
"line": 31
|
||||
},
|
||||
"message": "A11y: <input> cannot have role 'tooltip'",
|
||||
"pos": 906,
|
||||
"start": {
|
||||
"character": 906,
|
||||
"column": 0,
|
||||
"line": 31
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 994,
|
||||
"column": 24,
|
||||
"line": 35
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'article'",
|
||||
"pos": 970,
|
||||
"start": {
|
||||
"character": 970,
|
||||
"column": 0,
|
||||
"line": 35
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1018,
|
||||
"column": 23,
|
||||
"line": 36
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'banner'",
|
||||
"pos": 995,
|
||||
"start": {
|
||||
"character": 995,
|
||||
"column": 0,
|
||||
"line": 36
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1049,
|
||||
"column": 30,
|
||||
"line": 37
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'complementary'",
|
||||
"pos": 1019,
|
||||
"start": {
|
||||
"character": 1019,
|
||||
"column": 0,
|
||||
"line": 37
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1070,
|
||||
"column": 20,
|
||||
"line": 38
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'img'",
|
||||
"pos": 1050,
|
||||
"start": {
|
||||
"character": 1050,
|
||||
"column": 0,
|
||||
"line": 38
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1096,
|
||||
"column": 25,
|
||||
"line": 39
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'listitem'",
|
||||
"pos": 1071,
|
||||
"start": {
|
||||
"character": 1071,
|
||||
"column": 0,
|
||||
"line": 39
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1118,
|
||||
"column": 21,
|
||||
"line": 40
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'main'",
|
||||
"pos": 1097,
|
||||
"start": {
|
||||
"character": 1097,
|
||||
"column": 0,
|
||||
"line": 40
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1142,
|
||||
"column": 23,
|
||||
"line": 41
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'region'",
|
||||
"pos": 1119,
|
||||
"start": {
|
||||
"character": 1119,
|
||||
"column": 0,
|
||||
"line": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1167,
|
||||
"column": 24,
|
||||
"line": 42
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'tooltip'",
|
||||
"pos": 1143,
|
||||
"start": {
|
||||
"character": 1143,
|
||||
"column": 0,
|
||||
"line": 42
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1237,
|
||||
"column": 26,
|
||||
"line": 46
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'article'",
|
||||
"pos": 1211,
|
||||
"start": {
|
||||
"character": 1211,
|
||||
"column": 0,
|
||||
"line": 46
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1263,
|
||||
"column": 25,
|
||||
"line": 47
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'banner'",
|
||||
"pos": 1238,
|
||||
"start": {
|
||||
"character": 1238,
|
||||
"column": 0,
|
||||
"line": 47
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1296,
|
||||
"column": 32,
|
||||
"line": 48
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'complementary'",
|
||||
"pos": 1264,
|
||||
"start": {
|
||||
"character": 1264,
|
||||
"column": 0,
|
||||
"line": 48
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1319,
|
||||
"column": 22,
|
||||
"line": 49
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'img'",
|
||||
"pos": 1297,
|
||||
"start": {
|
||||
"character": 1297,
|
||||
"column": 0,
|
||||
"line": 49
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1347,
|
||||
"column": 27,
|
||||
"line": 50
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'listitem'",
|
||||
"pos": 1320,
|
||||
"start": {
|
||||
"character": 1320,
|
||||
"column": 0,
|
||||
"line": 50
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1371,
|
||||
"column": 23,
|
||||
"line": 51
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'main'",
|
||||
"pos": 1348,
|
||||
"start": {
|
||||
"character": 1348,
|
||||
"column": 0,
|
||||
"line": 51
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1397,
|
||||
"column": 25,
|
||||
"line": 52
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'region'",
|
||||
"pos": 1372,
|
||||
"start": {
|
||||
"character": 1372,
|
||||
"column": 0,
|
||||
"line": 52
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 1424,
|
||||
"column": 26,
|
||||
"line": 53
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'tooltip'",
|
||||
"pos": 1398,
|
||||
"start": {
|
||||
"character": 1398,
|
||||
"column": 0,
|
||||
"line": 53
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1527,
|
||||
"column": 19,
|
||||
"line": 57
|
||||
},
|
||||
"message": "A11y: Abstract role 'command' is forbidden",
|
||||
"pos": 1513,
|
||||
"start": {
|
||||
"character": 1513,
|
||||
"column": 5,
|
||||
"line": 57
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1552,
|
||||
"column": 21,
|
||||
"line": 58
|
||||
},
|
||||
"message": "A11y: Abstract role 'composite' is forbidden",
|
||||
"pos": 1536,
|
||||
"start": {
|
||||
"character": 1536,
|
||||
"column": 5,
|
||||
"line": 58
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1573,
|
||||
"column": 17,
|
||||
"line": 59
|
||||
},
|
||||
"message": "A11y: Abstract role 'input' is forbidden",
|
||||
"pos": 1561,
|
||||
"start": {
|
||||
"character": 1561,
|
||||
"column": 5,
|
||||
"line": 59
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1597,
|
||||
"column": 20,
|
||||
"line": 60
|
||||
},
|
||||
"message": "A11y: Abstract role 'landmark' is forbidden",
|
||||
"pos": 1582,
|
||||
"start": {
|
||||
"character": 1582,
|
||||
"column": 5,
|
||||
"line": 60
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1618,
|
||||
"column": 17,
|
||||
"line": 61
|
||||
},
|
||||
"message": "A11y: Abstract role 'range' is forbidden",
|
||||
"pos": 1606,
|
||||
"start": {
|
||||
"character": 1606,
|
||||
"column": 5,
|
||||
"line": 61
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1642,
|
||||
"column": 20,
|
||||
"line": 62
|
||||
},
|
||||
"message": "A11y: Abstract role 'roletype' is forbidden",
|
||||
"pos": 1627,
|
||||
"start": {
|
||||
"character": 1627,
|
||||
"column": 5,
|
||||
"line": 62
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1665,
|
||||
"column": 19,
|
||||
"line": 63
|
||||
},
|
||||
"message": "A11y: Abstract role 'section' is forbidden",
|
||||
"pos": 1651,
|
||||
"start": {
|
||||
"character": 1651,
|
||||
"column": 5,
|
||||
"line": 63
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1692,
|
||||
"column": 23,
|
||||
"line": 64
|
||||
},
|
||||
"message": "A11y: Abstract role 'sectionhead' is forbidden",
|
||||
"pos": 1674,
|
||||
"start": {
|
||||
"character": 1674,
|
||||
"column": 5,
|
||||
"line": 64
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1714,
|
||||
"column": 18,
|
||||
"line": 65
|
||||
},
|
||||
"message": "A11y: Abstract role 'select' is forbidden",
|
||||
"pos": 1701,
|
||||
"start": {
|
||||
"character": 1701,
|
||||
"column": 5,
|
||||
"line": 65
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1739,
|
||||
"column": 21,
|
||||
"line": 66
|
||||
},
|
||||
"message": "A11y: Abstract role 'structure' is forbidden",
|
||||
"pos": 1723,
|
||||
"start": {
|
||||
"character": 1723,
|
||||
"column": 5,
|
||||
"line": 66
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1851,
|
||||
"column": 18,
|
||||
"line": 71
|
||||
},
|
||||
"message": "A11y: Abstract role 'widget' is forbidden",
|
||||
"pos": 1838,
|
||||
"start": {
|
||||
"character": 1838,
|
||||
"column": 5,
|
||||
"line": 71
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-abstract-role",
|
||||
"end": {
|
||||
"character": 1873,
|
||||
"column": 18,
|
||||
"line": 72
|
||||
},
|
||||
"message": "A11y: Abstract role 'window' is forbidden",
|
||||
"pos": 1860,
|
||||
"start": {
|
||||
"character": 1860,
|
||||
"column": 5,
|
||||
"line": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 3695,
|
||||
"column": 28,
|
||||
"line": 145
|
||||
},
|
||||
"message": "A11y: <menuitem> cannot have role 'listitem'",
|
||||
"pos": 3667,
|
||||
"start": {
|
||||
"character": 3667,
|
||||
"column": 0,
|
||||
"line": 145
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 3734,
|
||||
"column": 38,
|
||||
"line": 146
|
||||
},
|
||||
"message": "A11y: <option> cannot have role 'listitem'",
|
||||
"pos": 3696,
|
||||
"start": {
|
||||
"character": 3696,
|
||||
"column": 0,
|
||||
"line": 146
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 3773,
|
||||
"column": 38,
|
||||
"line": 147
|
||||
},
|
||||
"message": "A11y: <select> cannot have role 'listitem'",
|
||||
"pos": 3735,
|
||||
"start": {
|
||||
"character": 3735,
|
||||
"column": 0,
|
||||
"line": 147
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 3801,
|
||||
"column": 27,
|
||||
"line": 148
|
||||
},
|
||||
"message": "A11y: <summary> cannot have role 'listitem'",
|
||||
"pos": 3774,
|
||||
"start": {
|
||||
"character": 3774,
|
||||
"column": 0,
|
||||
"line": 148
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 3842,
|
||||
"column": 40,
|
||||
"line": 149
|
||||
},
|
||||
"message": "A11y: <textarea> cannot have role 'listitem'",
|
||||
"pos": 3802,
|
||||
"start": {
|
||||
"character": 3802,
|
||||
"column": 0,
|
||||
"line": 149
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "a11y-no-interactive-element-to-noninteractive-role",
|
||||
"end": {
|
||||
"character": 3865,
|
||||
"column": 22,
|
||||
"line": 150
|
||||
},
|
||||
"message": "A11y: <tr> cannot have role 'listitem'",
|
||||
"pos": 3843,
|
||||
"start": {
|
||||
"character": 3843,
|
||||
"column": 0,
|
||||
"line": 150
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Reference in new issue