@fabio.caffarello/react-design-system 1.23.13 → 1.23.14

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.
@@ -15,6 +15,25 @@ export interface AutocompleteProps {
15
15
  className?: string;
16
16
  inputClassName?: string;
17
17
  size?: "sm" | "md" | "lg";
18
+ /**
19
+ * Visible label rendered above the input via the `Input` primitive's
20
+ * `label` API, which wires `<label htmlFor>` to the inner `<input>`.
21
+ * Provides the accessible name axe `aria-input-field-name` requires.
22
+ */
23
+ label?: string;
24
+ /**
25
+ * Invisible accessible name. Use when the input has no visible label
26
+ * (e.g. a tightly-packed toolbar combobox). One of `label`,
27
+ * `aria-label`, or `aria-labelledby` MUST be present — without any,
28
+ * the input has no programmatic name and axe `aria-input-field-name`
29
+ * (serious) flags it. A dev-only warning fires when all are missing.
30
+ */
31
+ "aria-label"?: string;
32
+ /**
33
+ * Override path: point at an id the consumer manages externally.
34
+ */
35
+ "aria-labelledby"?: string;
36
+ id?: string;
18
37
  }
19
38
  /**
20
39
  * Autocomplete Component
@@ -10,6 +10,16 @@ export interface AutocompleteListProps {
10
10
  allSelected?: boolean;
11
11
  onSelectAll?: () => void;
12
12
  onDeselectAll?: () => void;
13
+ /**
14
+ * Accessible name for the listbox. axe `aria-input-field-name`
15
+ * (serious) flags a `role="listbox"` portal without `aria-label` /
16
+ * `aria-labelledby` / `title`. The Autocomplete / MultiSelect parent
17
+ * cascades whatever accessible-name source the consumer provided
18
+ * (label string, aria-label, or external id) so the listbox inherits
19
+ * the same name as the input it dropdowns from.
20
+ */
21
+ "aria-label"?: string;
22
+ "aria-labelledby"?: string;
13
23
  }
14
24
  /**
15
25
  * AutocompleteList Component
@@ -3,11 +3,43 @@ export interface DrawerContentProps {
3
3
  children: ReactNode;
4
4
  className?: string;
5
5
  showCloseButton?: boolean;
6
+ /**
7
+ * Visible title rendered as a heading at the top of the drawer AND
8
+ * wired as the dialog's accessible name via `aria-labelledby`. Use
9
+ * this for the canonical case ("the drawer has a title").
10
+ */
11
+ title?: string;
12
+ /**
13
+ * Invisible accessible name. Use when the drawer has no visible
14
+ * title (e.g. a content-only side panel). One of `title`,
15
+ * `aria-label`, or `aria-labelledby` MUST be present — without any,
16
+ * `role="dialog"` has no accessible name and axe `aria-dialog-name`
17
+ * (serious) flags it. A dev-only warning fires when all three are
18
+ * missing.
19
+ */
20
+ "aria-label"?: string;
21
+ /**
22
+ * Override path: point at an id the consumer manages externally
23
+ * (typically a heading inside a `<DrawerHeader>` they laid out
24
+ * themselves). Takes precedence over `title` (which would otherwise
25
+ * generate its own id).
26
+ */
27
+ "aria-labelledby"?: string;
6
28
  }
7
29
  /**
8
30
  * DrawerContent Component
9
31
  *
10
32
  * The main content container for the drawer.
11
33
  * Renders in a portal with overlay.
34
+ *
35
+ * Accessible name — one of three paths:
36
+ * 1. `title="..."` → auto-renders a heading at the top and wires
37
+ * `aria-labelledby` to it.
38
+ * 2. `aria-label="..."` → invisible name on the dialog.
39
+ * 3. `aria-labelledby="external-id"` → consumer-managed id (typically
40
+ * a heading they place inside `<DrawerHeader>`).
41
+ *
42
+ * If all three are absent, the dialog has no accessible name —
43
+ * a dev-only `console.warn` fires.
12
44
  */
13
- export default function DrawerContent({ children, className, showCloseButton, }: DrawerContentProps): import("react").ReactPortal | null;
45
+ export default function DrawerContent({ children, className, showCloseButton, title, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledByProp, }: DrawerContentProps): import("react").ReactPortal | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fabio.caffarello/react-design-system",
3
3
  "private": false,
4
- "version": "1.23.13",
4
+ "version": "1.23.14",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",