positive type check
This commit is contained in:
parent
0caf81fa46
commit
ff94038b39
|
@ -357,8 +357,7 @@ function focusAccessibility() {
|
||||||
const isOutlineAllowed = ({localName, type}) =>
|
const isOutlineAllowed = ({localName, type}) =>
|
||||||
!focusAccessibility.ELEMENTS.includes(localName) ||
|
!focusAccessibility.ELEMENTS.includes(localName) ||
|
||||||
// allow outline on text/search inputs in addition to textareas
|
// allow outline on text/search inputs in addition to textareas
|
||||||
localName === 'input' &&
|
localName === 'input' && /^(text|search|number)$/.test(type);
|
||||||
!/^(button|checkbox|color|file|image|radio|submit|range)$/.test(type);
|
|
||||||
|
|
||||||
addEventListener('mousedown', suppressOutlineOnClick, {passive: true});
|
addEventListener('mousedown', suppressOutlineOnClick, {passive: true});
|
||||||
addEventListener('keydown', keepOutlineOnTab, {passive: true});
|
addEventListener('keydown', keepOutlineOnTab, {passive: true});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user