From 6ee80b36f4745503ca570c227d9ff92957534d1a Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Fri, 3 Jul 2026 17:05:05 +0800 Subject: [PATCH] chore(lint): enforce jsx-a11y/label-has-associated-control eslint-config-next enables only a narrow jsx-a11y subset (alt-text, aria-props, role validity), so pattern (~13 correct controls) and depth tuning does not clear them. Precise unlabeled-control detection belongs in a runtime axe-core check (tracked separately). lint (0 errors), typecheck, and prettier all clean. Co-Authored-By: Claude Opus 4.8 --- eslint.config.mjs | 16 +++++++++++++++ src/components/ClinicalDashboard.tsx | 30 ++++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index db058f597b..1154499547 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -5,6 +5,22 @@ import nextTs from "eslint-config-next/typescript"; const eslintConfig = defineConfig([ ...nextVitals, ...nextTs, + // Accessibility: eslint-config-next only enables a narrow jsx-a11y subset + // (alt-text, aria-props, role validity). Add `label-has-associated-control` + // so a ` pattern + // (~13 correctly-labeled controls) and `depth` tuning does not clear them. + // Precise unlabeled-control detection belongs in a runtime axe-core check. + { + files: ["**/*.{jsx,tsx}"], + rules: { + "jsx-a11y/label-has-associated-control": "error", + }, + }, // Override default ignores of eslint-config-next. globalIgnores([ // Default ignores of eslint-config-next: diff --git a/src/components/ClinicalDashboard.tsx b/src/components/ClinicalDashboard.tsx index c19be59c6b..a87b8be598 100644 --- a/src/components/ClinicalDashboard.tsx +++ b/src/components/ClinicalDashboard.tsx @@ -2351,8 +2351,14 @@ function DocumentDrawer({ {/* Dynamic Browse Library Filters */}
- +
- +
- +
-