Files
3x-ui/frontend/.oxlintrc.json
T
Alireza Ahmadi e2184777a0 fix(frontend): make the panel usable with screen readers (#6907)
* fix(frontend): make the panel usable with screen readers

* fix(frontend): keep mobile tab names and the inbound expiry hint

Review of #6907 found two gaps in the screen-reader pass:

- On phone-width screens catTabLabel renders only the icon and names the
  tab by putting aria-label on it, but callers now pass that icon with
  aria-hidden for the desktop label, so every Settings, Xray and Host
  category tab lost its name under TalkBack. catTabLabel now clears
  aria-hidden on the icon it uses as the name.
- DateTimePicker forwarded id and aria-label but not aria-describedby,
  so the inbound expiry hint ("leave blank to never expire") was never
  attached. It now forwards it on both the Gregorian and Jalali input.
2026-10-23 18:29:47 +02:00

96 lines
2.2 KiB
JSON

{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"ignorePatterns": [
"node_modules/**"
],
"plugins": [
"typescript",
"react",
"jsx-a11y"
],
"jsPlugins": [
"./tools/oxlint/input-number-guard.mjs",
"./tools/oxlint/control-label-guard.mjs",
"./tools/oxlint/icon-a11y-guard.mjs"
],
"categories": {
"correctness": "error"
},
"env": {
"browser": true,
"es2022": true
},
"rules": {
"typescript/no-explicit-any": "error",
"typescript/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"typescript/ban-ts-comment": "error",
"typescript/no-empty-object-type": "error",
"typescript/no-namespace": "error",
"typescript/no-require-imports": "error",
"typescript/no-this-alias": "error",
"typescript/no-unsafe-function-type": "error",
"typescript/no-unused-expressions": "warn",
"typescript/no-wrapper-object-types": "error",
"typescript/prefer-as-const": "error",
"typescript/triple-slash-reference": "error",
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"jsx-a11y/no-autofocus": "off",
"input-number/no-synthetic-clear": "off",
"jsx-a11y/prefer-tag-over-role": "off",
"control-label/has-name": "off",
"antd-icon/explicit-a11y": "off"
},
"overrides": [
{
"files": [
"src/pages/settings/**/*.tsx",
"src/pages/xray/**/*.tsx"
],
"rules": {
"input-number/no-synthetic-clear": "error"
}
},
{
"files": [
"src/pages/xray/**/*Modal.tsx"
],
"rules": {
"input-number/no-synthetic-clear": "off"
}
},
{
"files": [
"src/**/*.tsx"
],
"rules": {
"control-label/has-name": "error",
"antd-icon/explicit-a11y": "error"
}
},
{
"files": [
"src/**/*.stories.tsx",
"src/test/**"
],
"rules": {
"control-label/has-name": "off",
"antd-icon/explicit-a11y": "off"
}
}
]
}