fix(820): fix tests

pull/5076/head
Bassam Ismail 5 years ago
parent b2de47e8f3
commit 60b1d96e2d

@ -61,11 +61,6 @@ const a11y_no_onchange = new Set([
'option'
]);
const a11y_mouse_events = new Set([
'onMouseOver',
'onMouseOut'
]);
const invisible_elements = new Set(['meta', 'html', 'script', 'style']);
const valid_modifiers = new Set([
@ -512,7 +507,7 @@ export default class Element extends Node {
}
}
if (a11y_mouse_events.has(this.name)) {
if (attribute_map.has('onMouseOver') || attribute_map.has('onMouseOut')) {
if (attribute_map.has('onMouseOver') && !attribute_map.has('onFocus')) {
component.warn(this, {
code: `a11y-mouse-events-have-key-events`,

@ -1 +1,32 @@
[]
[
{
"code": "a11y-mouse-events-have-key-events",
"end": {
"character": 36,
"column": 36,
"line": 1
},
"message": "A11y: onMouseOver must be accompanied by onFocus for accessibility.",
"pos": 0,
"start": {
"character": 0,
"column": 0,
"line": 1
}
},
{
"code": "a11y-mouse-events-have-key-events",
"end": {
"character": 194,
"column": 59,
"line": 4
},
"message": "A11y: onMouseOut must be accompanied by onBlur for accessibility.",
"pos": 135,
"start": {
"character": 135,
"column": 0,
"line": 4
}
}
]

Loading…
Cancel
Save