Repository navigation
Commit b4a83fc
fix(a11y): WCAG 2.4.7 — scope focus-visible to interactive elements and document WCAG trade-offs
Addresses Rusackas' review feedback while preserving WCAG conformance.
GlobalStyles.tsx:
- Replace the global `*:focus-visible` selector with an explicit list of
interactive elements (native focusable elements, common ARIA roles,
AntD wrappers), wrapped in :where() so the rule stays at specificity
(0,0,1,0) and remains overridable by component-level styles.
- Keep !important on the outline declarations with an inline rationale:
AntD ships per-component focus resets like `.ant-btn:focus { outline: 0 }`
at the same specificity, and its runtime-injected styles can land after
this global block. Without !important the WCAG 2.4.7 focus indicator
silently disappears on AntD components.
TimeFilterPlugin.tsx:
- Document why this file uses `theme.colorPrimary` instead of the default
`theme.controlOutline` token: `controlOutline` is a low-alpha tint of
colorPrimary that typically fails WCAG 1.4.11 (3:1 non-text contrast).
Reverting to `controlOutline` would regress 1.4.11, so the swap stays
but is now explicitly annotated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ffee2f3 commit b4a83fc
2 files changed
Lines changed: 59 additions & 5 deletions
File tree
- superset-frontend
- packages/superset-core/src/theme
- src/filters/components/Time
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
123 | 167 | | |
124 | 168 | | |
125 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | | - | |
| 76 | + | |
67 | 77 | | |
68 | 78 | | |
69 | 79 | | |
| |||
0 commit comments