@adobe-commerce/elsie 2.1.0-beta.8 → 2.1.1-alpha-20260925105812

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,134 @@
1
1
  # @adobe-commerce/elsie
2
2
 
3
+ ## 2.1.1-alpha-20260925105812
4
+
5
+ ### Patch Changes
6
+
7
+ - e06c05f: fix(a11y): Checkbox now derives its internal label/description ids
8
+ from the unique `id` prop when provided, instead of the (often shared) `name`
9
+ prop, so two checkboxes with the same `name` no longer produce duplicate DOM
10
+ ids that cause screen readers to announce the wrong checkbox's label (WCAG
11
+ 4.1.2)
12
+
13
+ ## 2.1.0
14
+
15
+ ### Minor Changes
16
+
17
+ - e8f81dd: **Incrementer**: Add optional `label` prop that renders a visible
18
+ `<label>` element associated with the input field via `htmlFor`/`id`. This
19
+ addresses WCAG 3.3.2 (Labels or Instructions) which requires form fields to
20
+ have visible labels.
21
+ - d9ac070: feat(a11y): add LiveRegion component and Button loading state for
22
+ WCAG 4.1.3
23
+
24
+ - New `LiveRegion` component: a visually-hidden, always-mounted
25
+ `role="status"` span for announcing status changes to screen readers without
26
+ focus movement. Accepts `message` (string toggled between empty and the
27
+ label) and `politeness` ("polite" | "assertive"). Use this alongside
28
+ `Skeleton` and `ProgressSpinner` instead of relying on those components' own
29
+ `role="status"` which fires unreliably when they are conditionally mounted.
30
+ - `Button` now accepts `loading?: boolean` (sets `aria-busy` on the button
31
+ element) and `loadingLabel?: string` (renders a sibling `LiveRegion` outside
32
+ the button element — live regions must not be nested inside interactive
33
+ elements).
34
+
35
+ - 4cecbe2: Bump `preact` from `~10.22.1` to `~10.29.7` and `@preact/signals`
36
+ from `1.3.0` to `^2.3.1`, matching the preact version most external consumers
37
+ already have installed.
38
+
39
+ Preact 10.29 narrowed its generic `HTMLAttributes<Target>` typings: `value`,
40
+ `checked`, `alt`, `width`, `height`, `loading`, `srcSet`, `required`, and
41
+ `name` moved out into per-element interfaces instead of being available on
42
+ every element generically. This restores the type declarations for the
43
+ components that were affected (`Input`, `TextArea`, `Checkbox`, `Image`,
44
+ `Incrementer`, `Button`, `ActionButton`, `Picker`, `InputFile`, `Accordion`,
45
+ `CartItem`, `Slot`) — no runtime or prop-API changes, just typings that would
46
+ otherwise break consumers' own TypeScript builds.
47
+
48
+ - cadd9f3: feat(lib): add `sanitizeHtml` and `createSanitizedHtml` helpers
49
+ (backed by DOMPurify) for safely rendering untrusted HTML via
50
+ `dangerouslySetInnerHTML`. By default only basic inline formatting tags are
51
+ allowed (`DEFAULT_ALLOWED_TAGS`); callers can extend or replace the
52
+ allow-list.
53
+
54
+ ### Patch Changes
55
+
56
+ - af12113: Accessibility color contrast fixes (WCAG 1.4.11, 1.4.3):
57
+
58
+ - **ProgressSpinner**: Use `--color-neutral-600` for inactive border (3.94:1
59
+ vs previous 1.46:1)
60
+ - **Button disabled states**: Use `--color-neutral-700` for text in all
61
+ variants (4.21:1 on neutral-300, 5.74:1 on white vs previous 1.36:1/1.91:1)
62
+
63
+ - 9a3dabd: Fix multiple accessibility issues in the `InputPassword` and `Field`
64
+ components:
65
+
66
+ - The input `aria-label` now uses the consumer-provided `floatingLabel` or
67
+ `placeholder` instead of a hardcoded "Password" translation, so the
68
+ accessible name matches the visible label (WCAG 2.5.3 Label in Name).
69
+ - The show/hide toggle button `aria-label` now includes the field label (e.g.
70
+ "Click to show password: New Password") so each instance is uniquely
71
+ identifiable by screen readers (WCAG 2.4.6 Headings and Labels).
72
+ - The `PasswordStatusIndicator` now receives a unique `id` via `useId()` and
73
+ the input `aria-describedby` references it, programmatically associating
74
+ password requirement messages with their field (WCAG 3.3.1 Error
75
+ Identification).
76
+ - The `Field` component no longer overrides the child's `aria-describedby`
77
+ with `undefined` when no error is present, preserving any existing
78
+ association.
79
+
80
+ - fe6e31d: Fix the `elsie concurrently` builder passing `killOthers` to the
81
+ `concurrently` package, which was renamed to `killOthersOn` in
82
+ `concurrently@10`. Since `concurrently` doesn't validate unknown options, the
83
+ mismatch silently no-opped `-k`/`--kill-others`, leaving sibling processes
84
+ (e.g. the `http-server` serving `storybook-static`) running after another
85
+ process in the group exited — hanging commands like `test-storybook-ci` until
86
+ an external timeout killed them.
87
+ - 1256599: Cap the `eslint-plugin-cypress` peer dependency range at `<7.0.0`.
88
+ The unbounded `>=3.0.0` range let npm's resolver consider
89
+ `eslint-plugin-cypress@7`, which peer-requires `eslint@>=10` and conflicts
90
+ with elsie's own `eslint@^9.39.5` dependency — even though
91
+ `eslint-plugin-cypress` remains an optional peer. Versions up to `6.4.4` still
92
+ support `eslint@>=9`, so the range now stays within what's actually
93
+ compatible.
94
+ - 089ba5c: fix(a11y): prevent dummy update when keyboard focus moves to
95
+ Incrementer buttons and add aria-valuetext for VoiceOver
96
+ - d59c153: Fix `Modal` accessibility: while the modal is open, sibling content
97
+ in `document.body` is now hidden from assistive technology with
98
+ `aria-hidden="true"`, preventing screen reader users from navigating outside
99
+ the modal with arrow keys. The attribute is removed automatically when the
100
+ modal closes. Other portal roots (e.g. nested modals or toasts) and elements
101
+ that already declare `aria-hidden` are left untouched.
102
+ - c9674f9: fix(a11y): add aria-current="page" to active pagination button and
103
+ fix active indicator contrast (WCAG 1.4.11, 4.1.2)
104
+ - 6957e90: Fix `PasswordStatusIndicator` requirement status changes (e.g. the
105
+ length or character-class error icon) not being announced by screen readers.
106
+ The container now carries `role="status"` and `aria-live="polite"` so
107
+ assistive technology announces requirement changes as they happen (WCAG
108
+ 4.1.3).
109
+ - 238981b: Pin Preact to 10.22.1, the latest version verified against the
110
+ affected consumer checkout flow without the AEM Asset Slot `insertBefore`
111
+ crash. Also restore `@preact/signals` 1.3.0, the compatible Signals release
112
+ used with this Preact version. Preact 10.23.0 introduced child-diffing changes
113
+ that expose the existing detached render-root and raw DOM graft behavior.
114
+ - 406a36d: Restore the existing Slot implementation and temporarily downgrade
115
+ Preact from 10.29 to 10.28.4, the latest pre-10.29 release, to avoid
116
+ intermittent `insertBefore` crashes in AEM Asset image Slots while the
117
+ underlying DOM graft and render-root ownership changes are developed and
118
+ validated separately.
119
+ - fea748d: Pin Preact to 10.27.0, the latest version verified not to throw with
120
+ the existing detached render-root mechanism. Preact 10.27.1 and newer
121
+ reproduce intermittent `insertBefore` crashes in AEM Asset image Slots.
122
+ - 85e5b20: fix(a11y): keep RadioButton's focusable input anchored to its visible
123
+ label when the page scrolls, preventing focus from appearing obscured or
124
+ off-screen (WCAG 2.4.11)
125
+ - 896c6c9: reCAPTCHA form types are now configurable via feature flag.
126
+ COMPANY_CREATE is no longer in the default form-type map. B2B storefronts pass
127
+ `{ b2bEnabled: true }` to `setConfig()` to include it in the configuration
128
+ query.
129
+ - a920177: fix(Incrementer): prevent quantity input flicker during in-progress
130
+ typing, and prevent double onValue call when debounce fires before blur
131
+
3
132
  ## 2.1.0-beta.8
4
133
 
5
134
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe-commerce/elsie",
3
- "version": "2.1.0-beta.8",
3
+ "version": "2.1.1-alpha-20260925105812",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "description": "Domain Package SDK",
6
6
  "engines": {
@@ -32,7 +32,7 @@
32
32
  "devDependencies": {
33
33
  "@adobe-commerce/event-bus": "~1.1.1",
34
34
  "@adobe-commerce/fetch-graphql": "~1.3.1",
35
- "@adobe-commerce/recaptcha": "1.3.0-beta.0",
35
+ "@adobe-commerce/recaptcha": "1.3.0",
36
36
  "@adobe-commerce/storefront-design": "~1.1.1",
37
37
  "@chromatic-com/storybook": "^5",
38
38
  "@dropins/build-tools": "~1.2.1"
@@ -39,12 +39,14 @@ export const Checkbox: FunctionComponent<CheckboxProps> = ({
39
39
  description = '',
40
40
  className,
41
41
  checked,
42
+ id,
42
43
  ...props
43
44
  }) => {
44
45
  const [isChecked, setIsChecked] = useState(
45
46
  checked === undefined ? false : checked,
46
47
  );
47
48
  const ref = useRef<HTMLInputElement>(null);
49
+ const baseId = id ?? name;
48
50
 
49
51
  const handleCheckboxChange = (e: ChangeEvent<HTMLInputElement>) => {
50
52
  props.onChange?.(e);
@@ -73,6 +75,7 @@ export const Checkbox: FunctionComponent<CheckboxProps> = ({
73
75
  >
74
76
  <input
75
77
  ref={ref}
78
+ id={id}
76
79
  name={name}
77
80
  value={value}
78
81
  type="checkbox"
@@ -92,8 +95,8 @@ export const Checkbox: FunctionComponent<CheckboxProps> = ({
92
95
  {'\u200B'}
93
96
  <span
94
97
  aria-checked={isChecked ? 'true' : 'false'}
95
- aria-labelledby={`${name}-label`}
96
- aria-describedby={description ? `${name}-description` : undefined}
98
+ aria-labelledby={`${baseId}-label`}
99
+ aria-describedby={description ? `${baseId}-description` : undefined}
97
100
  className={classes([
98
101
  'dropin-checkbox__box',
99
102
  ['dropin-checkbox__box--error', error],
@@ -113,7 +116,7 @@ export const Checkbox: FunctionComponent<CheckboxProps> = ({
113
116
  </div>
114
117
 
115
118
  <div
116
- id={`${name}-label`}
119
+ id={`${baseId}-label`}
117
120
  className={classes([
118
121
  'dropin-checkbox__label',
119
122
  `dropin-checkbox__label--${size}`,
@@ -126,7 +129,7 @@ export const Checkbox: FunctionComponent<CheckboxProps> = ({
126
129
  <div />
127
130
  {description && (
128
131
  <div
129
- id={`${name}-description`}
132
+ id={`${baseId}-description`}
130
133
  role={'note'}
131
134
  className={classes([
132
135
  'dropin-checkbox__description',