Skip to content

Commit

Permalink
[fix]: ignore a11y rule, add comment; link issues for the future
Browse files Browse the repository at this point in the history
Linked issues:
- #526
- #527
- #528
  • Loading branch information
0x009922 committed Mar 27, 2023
1 parent 383eb3a commit b0f654c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 14 deletions.
44 changes: 33 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@ module.exports = {

'@typescript-eslint/consistent-type-definitions': 'off',

// FIXME
'vuejs-accessibility/no-static-element-interactions': 'off',

"vuejs-accessibility/label-has-for": [
"error",
'vuejs-accessibility/label-has-for': [
'error',
{
// all labels should have `for` attr
"required": "id",
}
]
required: 'id',
},
],
},
overrides: [
{
Expand All @@ -55,7 +52,7 @@ module.exports = {
'vue/one-component-per-file': 'off',

// We don't need such strictness in stories
'vue/require-prop-types': 'off'
'vue/require-prop-types': 'off',
},
},
{
Expand All @@ -65,15 +62,40 @@ module.exports = {

// We don't need such strictness in tests
'vue/require-default-prop': 'off',
'vue/require-prop-types': 'off'
'vue/require-prop-types': 'off',
},
},

// FIXME https://github.com/soramitsu/soramitsu-js-ui-library/issues/525
{
files: ['**/ui/src/components/Select/**/*.vue'],
rules: {
// FIXME https://github.com/soramitsu/soramitsu-js-ui-library/issues/525
'vuejs-accessibility/click-events-have-key-events': 'off',
'vuejs-accessibility/no-static-element-interactions': 'off',
},
},

{
files: ['**/ui/src/components/DatePicker/**/*.vue'],
rules: {
// FIXME https://github.com/soramitsu/soramitsu-js-ui-library/issues/526
'vuejs-accessibility/no-static-element-interactions': 'off',
},
},

{
files: ['**/ui/src/components/Table/**/*.vue'],
rules: {
// FIXME https://github.com/soramitsu/soramitsu-js-ui-library/issues/527
'vuejs-accessibility/no-static-element-interactions': 'off',
},
},

// FIXME https://github.com/soramitsu/soramitsu-js-ui-library/issues/528
{
files: ['**/ui/src/components/JsonInput/**/*.vue'],
rules: {
'vuejs-accessibility/no-static-element-interactions': 'off',
},
},
],
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/components/Modal/SModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ useCloseOnEsc(
v-bind="overlayTransitionAttrs"
v-on="overlayTransitionListeners"
>
<!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events -->
<!-- "click" handling is made purely for convenience of mouse users,
thus, this element should not be "accessible".
keyboard interaction is handled separately -->
<!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events vuejs-accessibility/no-static-element-interactions -->
<div
v-if="overlayIf"
:class="['s-modal__overlay', overlayClass]"
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/src/components/TextField/STextField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,9 @@ const finalId = useElementIdFallback(toRef(props, 'id'))
:style="rootStyle()"
:data-status="status"
>
<!-- key events works with input element -->
<!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events -->
<!-- all interaction is made through `<input>`.
these mouse events are handled for mouse users convenience -->
<!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events vuejs-accessibility/no-static-element-interactions -->
<div
class="s-text-field__input-wrapper"
@click="handleInputWrapperClick"
Expand Down

0 comments on commit b0f654c

Please sign in to comment.