summaryrefslogtreecommitdiffstats
path: root/src/components/atoms
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-06-02 19:03:33 +0200
committerGitHub <noreply@github.com>2022-06-02 19:03:33 +0200
commita8af53c118478e6ed68975c32cc1202b7c7b798e (patch)
treee8baa78566523de3d3533f0815efb375a00878d9 /src/components/atoms
parent329d5ab3f49d663f40a965af4d29eaa38b9a4a86 (diff)
parentd7fa0a16bebbb58e842f28396a0973f16a060996 (diff)
fix: improve settings accessibility (#18)
The settings modal had some accessibility issues: * the SVG title was not used as radio button label, * the state of the help button was only visual.
Diffstat (limited to 'src/components/atoms')
-rw-r--r--src/components/atoms/buttons/button.tsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/components/atoms/buttons/button.tsx b/src/components/atoms/buttons/button.tsx
index 9776687..fecbcfd 100644
--- a/src/components/atoms/buttons/button.tsx
+++ b/src/components/atoms/buttons/button.tsx
@@ -8,6 +8,14 @@ import styles from './buttons.module.scss';
export type ButtonProps = {
/**
+ * Button accessible label.
+ */
+ 'aria-label'?: string;
+ /**
+ * Indicates the current "pressed" state of a toggle button.
+ */
+ 'aria-pressed'?: boolean | 'mixed';
+ /**
* The button body.
*/
children: ReactNode;
@@ -16,10 +24,6 @@ export type ButtonProps = {
*/
className?: string;
/**
- * Button accessible label.
- */
- 'aria-label'?: string;
- /**
* Button state. Default: false.
*/
disabled?: boolean;