no-distracting-elements

pull/815/head
Rich Harris 7 years ago
parent 81c5a1fb3b
commit b3409ad405

@ -130,6 +130,11 @@ export default function a11y(
shouldHaveAttribute(['title']); shouldHaveAttribute(['title']);
} }
// no-distracting-elements
if (node.name === 'marquee' || node.name === 'blink') {
validator.warn(`A11y: Avoid <${node.name}> elements`, node.start);
}
if (node.name === 'figcaption') { if (node.name === 'figcaption') {
const parent = elementStack[elementStack.length - 1]; const parent = elementStack[elementStack.length - 1];
if (parent) { if (parent) {

@ -0,0 +1,19 @@
[
{
"message": "A11y: Avoid <marquee> elements",
"loc": {
"line": 1,
"column": 0
},
"pos": 0
},
{
"message": "A11y: Avoid <blink> elements",
"loc": {
"line": 2,
"column": 0
},
"pos": 11
}
]
Loading…
Cancel
Save