@kenlo/kdls-design-system 2.12.2 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,10 @@ export interface CheckboxProps {
29
29
  name?: string;
30
30
  /** Marks the field as required — asterisk on the label and aria-required on the box */
31
31
  required?: boolean;
32
+ /** Accessible name when there is no visible label (e.g. a row-selection box) — replaces the label as the name screen readers announce */
33
+ 'aria-label'?: string;
34
+ /** Id of the visible element that names the checkbox (e.g. the row's title) */
35
+ 'aria-labelledby'?: string;
32
36
  /** Additional CSS classes */
33
37
  className?: string;
34
38
  }
@@ -12,6 +12,8 @@ export interface ToggleItem {
12
12
  iconRight?: IconElement;
13
13
  /** Disables only this item */
14
14
  disabled?: boolean;
15
+ /** Accessible name of this item — required in practice when it shows only an icon, which otherwise has no name */
16
+ 'aria-label'?: string;
15
17
  }
16
18
  export interface ToggleProps {
17
19
  /** List of options — minimum 2 items */
@@ -26,6 +28,10 @@ export interface ToggleProps {
26
28
  onChange?: (value: string) => void;
27
29
  /** Disables all items */
28
30
  disabled?: boolean;
31
+ /** Accessible name of the group — use when no visible title names the options */
32
+ 'aria-label'?: string;
33
+ /** Id of the visible element that names the group — prefer it over aria-label when that title is on screen */
34
+ 'aria-labelledby'?: string;
29
35
  /** Additional CSS classes */
30
36
  className?: string;
31
37
  }