diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-24 16:05:03 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-24 16:05:03 +0200 |
| commit | e1cc2de22fc703d94e1151beb9526d8cbe0e49c1 (patch) | |
| tree | cffd9ada0c418d5e9fb02236c4a7bc050f4c0208 /src/components/atoms | |
| parent | 525ea4c39c4965d9f6f7941cf203e56190d0ec1c (diff) | |
chore(toolbar): change icons to close button when activated
Diffstat (limited to 'src/components/atoms')
| -rw-r--r-- | src/components/atoms/forms/label.stories.tsx | 13 | ||||
| -rw-r--r-- | src/components/atoms/forms/label.tsx | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/components/atoms/forms/label.stories.tsx b/src/components/atoms/forms/label.stories.tsx index 79f1a34..f66aa13 100644 --- a/src/components/atoms/forms/label.stories.tsx +++ b/src/components/atoms/forms/label.stories.tsx @@ -12,6 +12,19 @@ export default { size: 'small', }, argTypes: { + 'aria-label': { + control: { + type: 'text', + }, + description: 'Define an accessible name.', + table: { + category: 'Accessibility', + }, + type: { + name: 'string', + required: false, + }, + }, className: { control: { type: 'text', diff --git a/src/components/atoms/forms/label.tsx b/src/components/atoms/forms/label.tsx index ce4c70f..2ec614f 100644 --- a/src/components/atoms/forms/label.tsx +++ b/src/components/atoms/forms/label.tsx @@ -3,6 +3,10 @@ import styles from './label.module.scss'; export type LabelProps = { /** + * An accessible name for the label. + */ + 'aria-label'?: string; + /** * The label body. */ children: ReactNode; |
