Commit 27fcd7c
authored
fix: Improve accessibility and code quality (#1985)
* fix: Replace deprecated onKeyPress with onKeyDown
This commit updates the component to use the recommended onKeyDown event handler, resolving a deprecation warning in React.
* style: Fix lint error for non-null assertion
Replaced the non-null assertion with a type assertion 'as HTMLElement' to resolve a linting error. This change ensures better type safety and code quality.
* fix: Improve color contrast ratio
This commit adjusts the background and foreground colors to meet WCAG AA standards. This fix ensures that text is readable and accessible for all users, including those with low vision.
* style: Remove empty css ruleset
Removed the empty class declaration. This is a code style cleanup that doesn't change functionality but improves the maintainability and readability of the codebase.
* docs: Add meta description to document and language attribute to root element
* fix: Associate labels with form elements
This commit ensures all form input elements are correctly associated with their labels using the 'for' attribute. This is a critical fix for users of assistive technologies and provides a better user experience for everyone.
* style: Use single quotes for HTML attributes1 parent 4650cb0 commit 27fcd7c
File tree
5 files changed
+9
-8
lines changed- examples/react
- public
- src
- src
5 files changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | 28 | | |
31 | | - | |
| 29 | + | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| |||
324 | 325 | | |
325 | 326 | | |
326 | 327 | | |
327 | | - | |
| 328 | + | |
328 | 329 | | |
329 | 330 | | |
| 331 | + | |
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments