Skip to content

Commit

Permalink
fix(ui-progress,ui-range-input): use just the native elements instead…
Browse files Browse the repository at this point in the history
… of ARIA tags

Adding these ARIA tags is not recommended for these since the screen readers can voice them
properly, no need for ARIA overrides
TEST PLAN:
Test ProgressBar, ProgressCircle, NumberInput with screenreaders
  • Loading branch information
matyasf committed Sep 23, 2024
1 parent 6c2359a commit e7be0e5
Show file tree
Hide file tree
Showing 16 changed files with 809 additions and 316 deletions.
21 changes: 16 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import tseslint from 'typescript-eslint'
import eslint from '@eslint/js'
import reactPlugin from 'eslint-plugin-react'
import jsxA11y from 'eslint-plugin-jsx-a11y'
import notice from "eslint-plugin-notice"
import eslintConfigPrettier from "eslint-config-prettier"
import vitest from "@vitest/eslint-plugin"
Expand Down Expand Up @@ -83,13 +84,12 @@ const finalConfig = tseslint.config(
"/coverage/**",
"**/stylelint.config.js",
"**/babel.config.js",
"karma.conf.js",
"packages/console/src/macro.js"
"karma.conf.js"
]
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...instructurePlugin.configs.recommended,
...instructurePlugin.configs.recommended,
{
name: "instUI-eslint-config",
linterOptions: {
Expand All @@ -100,7 +100,6 @@ const finalConfig = tseslint.config(
},
plugins: {
...reactPlugin.configs.flat.recommended.plugins,
//'jsx-a11y', // TODO add this back if it supports ESLint v9
notice
},
rules: {
Expand All @@ -126,7 +125,7 @@ const finalConfig = tseslint.config(
'react/forbid-foreign-prop-types': 'error',
'react/no-danger': 'error',
'react/prop-types': ['error', { skipUndeclared: true }],
'react/require-default-props': 'error',
'react/require-default-props': 'warn',
'react/no-typos': 'error',
'react/no-unknown-property': ['error', { ignore: ['css', 'componentRef'] }],
// overrides for eslint-plugin-notice
Expand Down Expand Up @@ -181,6 +180,18 @@ const finalConfig = tseslint.config(
'vitest/no-commented-out-tests': 'warn'
}
},
{ // Do not check unit tests for a11y
ignores: [
'**/__new-tests__/**',
'**/__tests__/**'
],
plugins: {
'jsx-a11y': jsxA11y,
},
rules: {
...jsxA11y.configs.recommended.rules,
}
},
{// Node scripts
files: [
"packages/+(" + NODE_PACKAGES + ")/**/*",
Expand Down
Loading

0 comments on commit e7be0e5

Please sign in to comment.