I've been helping out on eslint-plugin-vuejs-accessibility which understandable mirrors a lot of this plugin, and there are a couple of issues open (vue-a11y/eslint-plugin-vuejs-accessibility#980, vue-a11y/eslint-plugin-vuejs-accessibility#1381) about the default handler configurations for the no-static-element-interactions rule.
Currently, the two interaction based rules are using an interactiveHandlers.json which contains:
[
"click",
"contextmenu",
"dblclick",
"doubleclick",
"drag",
"dragend",
"dragenter",
"dragexit",
"dragleave",
"dragover",
"dragstart",
"drop",
"keydown",
"keypress",
"keyup",
"mousedown",
"mouseenter",
"mouseleave",
"mousemove",
"mouseout",
"mouseover",
"mouseup"
]
This looks to match the default interactive handlers for the jsx rule, which I assume is what it was based on:
|
const defaultInteractiveProps = [].concat( |
|
eventHandlersByType.focus, |
|
eventHandlersByType.keyboard, |
|
eventHandlersByType.mouse, |
|
); |
However, the documentation and recommended config for this plugin is reconfiguring the rule with a smaller set of handlers:
|
'jsx-a11y/no-static-element-interactions': [ |
|
'error', |
|
{ |
|
allowExpressionValues: true, |
|
handlers: [ |
|
'onClick', |
|
'onMouseDown', |
|
'onMouseUp', |
|
'onKeyPress', |
|
'onKeyDown', |
|
'onKeyUp', |
|
], |
|
}, |
|
], |
Is there a particular reason for this difference, or just an oversight?
I've been helping out on
eslint-plugin-vuejs-accessibilitywhich understandable mirrors a lot of this plugin, and there are a couple of issues open (vue-a11y/eslint-plugin-vuejs-accessibility#980, vue-a11y/eslint-plugin-vuejs-accessibility#1381) about the default handler configurations for theno-static-element-interactionsrule.Currently, the two interaction based rules are using an
interactiveHandlers.jsonwhich contains:This looks to match the default interactive handlers for the jsx rule, which I assume is what it was based on:
eslint-plugin-jsx-a11y/src/rules/no-static-element-interactions.js
Lines 33 to 37 in 8f75961
However, the documentation and recommended config for this plugin is reconfiguring the rule with a smaller set of handlers:
eslint-plugin-jsx-a11y/src/index.js
Lines 183 to 196 in 8f75961
Is there a particular reason for this difference, or just an oversight?