origam 2.37.29 → 2.37.30

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
@@ -18,6 +18,17 @@ This project follows [Semantic Versioning](https://semver.org).
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [2.37.30] - 2026-11-02
22
+
23
+ ### Fixed — `OrigamColorPickerField`, `OrigamDatePickerField` : le rôle combobox passe du wrapper à l'`<input>` (#1308)
24
+
25
+ Les deux pickers passaient `role: 'combobox'` dans les `activatorProps` de leur menu. Le rôle atterrissait donc sur le wrapper `.origam-field` et non sur l'`<input>` : c'est le défaut que #1247 avait déjà corrigé sur Select.
26
+
27
+ - Nouvelle constante partagée `MENU_WRAPPER_ARIA_RESET` (`consts/Menu/menu.const.ts`) : elle neutralise sur le wrapper `aria-haspopup`, `aria-expanded` et `aria-owns`. `OrigamSelect` l'utilise à la place de sa copie inline.
28
+ - Les deux pickers posent désormais `role="combobox"`, `aria-haspopup="dialog"` et `aria-expanded` sur l'`<input>`.
29
+ - Vérifié : le TU `picker-field-wrapper-role.spec.ts` (zéro violation axe, un seul combobox, l'`<input>`) est rouge sur le parent (combobox sur un `DIV`) et vert après. Les a11y composants sont verts en Chromium pour les deux pickers fermés (PR #1312).
30
+ - Non vérifié : l'état ouvert des pickers dans un vrai navigateur.
31
+
21
32
  ## [2.37.29] - 2026-11-02
22
33
 
23
34
  ### Fixed — `OrigamTable` : le côté du séparateur de ligne est thémable (#1262)
@@ -12,7 +12,7 @@
12
12
  :title="label ? t(label) : undefined"
13
13
  :validation-value="effectiveValidationValue"
14
14
 
15
- v-bind="{ ...textFieldProps }"
15
+ v-bind="{ ...textFieldProps, ...comboboxAriaAttrs }"
16
16
  @blur="handleBlur"
17
17
  @change="handleChange"
18
18
  @click:clear="handleClear"
@@ -142,6 +142,7 @@ import { useVModel } from "../../composables/Commons/vModel.composable";
142
142
  import { useStyle } from "../../composables/Commons/style.composable";
143
143
  import { COLOR_NULL } from "../../consts/ColorPicker/color-picker.const";
144
144
  import { ORIGAM_FORM_KEY } from "../../consts/Form/form.const";
145
+ import { MENU_WRAPPER_ARIA_RESET } from "../../consts/Menu/menu.const";
145
146
  import { BLOCK } from "../../enums/Commons/anchor.enum";
146
147
  import { DENSITY } from "../../enums/Commons/density.enum";
147
148
  import { DIRECTION } from "../../enums/Commons/direction.enum";
@@ -346,6 +347,11 @@ const { typographyStyles: menuTypographyStyles } = useTeleportTypography(origamT
346
347
  "--origam-picker-title---font-size": fontSize,
347
348
  "--origam-color-picker-edit__label---font-size": fontSize
348
349
  }));
350
+ const comboboxAriaAttrs = computed(() => ({
351
+ role: "combobox",
352
+ "aria-haspopup": "dialog",
353
+ "aria-expanded": menu.value ? "true" : "false"
354
+ }));
349
355
  const menuProps = computed(() => {
350
356
  const consumerContentProps = props.menuProps?.contentProps ?? {};
351
357
  return {
@@ -365,17 +371,13 @@ const menuProps = computed(() => {
365
371
  * uses right below.
366
372
  *
367
373
  * @description
368
- * `role: 'combobox'` is ALSO required here: `activator="parent"`
369
- * (below) lands these ARIA attrs on the `.origam-field` wrapper
370
- * `<div>`, which carries no role by default — `aria-allowed-attr`
371
- * rejects `aria-expanded` on an element whose role doesn't
372
- * support it. Same fix, same rationale as
373
- * `OrigamSelect.comboboxAriaAttrs` (`role` MUST sit on the same
374
- * element as `aria-haspopup`/`aria-expanded`).
374
+ * #1308 — role + `aria-haspopup`/`aria-expanded` live on the <input>
375
+ * (`comboboxAriaAttrs`), as in `OrigamSelect` (#1247).
376
+ * `activator="parent"` is the role-less `.origam-field` wrapper, so the
377
+ * menu's default ARIA is neutralised there.
375
378
  ********************************************************/
376
- role: "combobox",
377
- ...props.menuProps?.activatorProps || {},
378
- "aria-haspopup": "dialog"
379
+ ...MENU_WRAPPER_ARIA_RESET,
380
+ ...props.menuProps?.activatorProps || {}
379
381
  },
380
382
  contentProps: {
381
383
  ...consumerContentProps,
@@ -12,7 +12,7 @@
12
12
  :title="label ? t(label) : undefined"
13
13
  :validation-value="effectiveValidationValue"
14
14
 
15
- v-bind="{ ...textFieldProps }"
15
+ v-bind="{ ...textFieldProps, ...comboboxAriaAttrs }"
16
16
  @blur="handleBlur"
17
17
  @change="handleChange"
18
18
  @click:clear="handleClear"
@@ -189,6 +189,7 @@ import { useTextColor } from "../../composables/Commons/textColor.composable";
189
189
  import { useVModel } from "../../composables/Commons/vModel.composable";
190
190
  import { useStyle } from "../../composables/Commons/style.composable";
191
191
  import { ORIGAM_FORM_KEY } from "../../consts/Form/form.const";
192
+ import { MENU_WRAPPER_ARIA_RESET } from "../../consts/Menu/menu.const";
192
193
  import { BLOCK } from "../../enums/Commons/anchor.enum";
193
194
  import { DENSITY } from "../../enums/Commons/density.enum";
194
195
  import { DIRECTION } from "../../enums/Commons/direction.enum";
@@ -420,6 +421,11 @@ const { typographyStyles: menuTypographyStyles } = useTeleportTypography(origamT
420
421
  "--origam-date-picker-month__weeks---font-size": fontSize,
421
422
  "--origam-date-picker-month__day---font-size": fontSize
422
423
  }));
424
+ const comboboxAriaAttrs = computed(() => ({
425
+ role: "combobox",
426
+ "aria-haspopup": "dialog",
427
+ "aria-expanded": menu.value ? "true" : "false"
428
+ }));
423
429
  const menuProps = computed(() => {
424
430
  const consumerContentProps = props.menuProps?.contentProps ?? {};
425
431
  return {
@@ -437,17 +443,13 @@ const menuProps = computed(() => {
437
443
  * calendar dialog.
438
444
  *
439
445
  * @description
440
- * `role: 'combobox'` is ALSO required here: `activator="parent"`
441
- * (below) lands these ARIA attrs on the `.origam-field` wrapper
442
- * `<div>`, which carries no role by default — `aria-allowed-attr`
443
- * rejects `aria-expanded` on an element whose role doesn't
444
- * support it. Same fix, same rationale as
445
- * `OrigamSelect.comboboxAriaAttrs` (`role` MUST sit on the same
446
- * element as `aria-haspopup`/`aria-expanded`).
446
+ * #1308 — role + `aria-haspopup`/`aria-expanded` live on the <input>
447
+ * (`comboboxAriaAttrs`), as in `OrigamSelect` (#1247).
448
+ * `activator="parent"` is the role-less `.origam-field` wrapper, so the
449
+ * menu's default ARIA is neutralised there.
447
450
  ********************************************************/
448
- role: "combobox",
449
- ...props.menuProps?.activatorProps || {},
450
- "aria-haspopup": "dialog"
451
+ ...MENU_WRAPPER_ARIA_RESET,
452
+ ...props.menuProps?.activatorProps || {}
451
453
  },
452
454
  contentProps: {
453
455
  ...consumerContentProps,
@@ -306,6 +306,7 @@ import { useTextColor } from "../../composables/Commons/textColor.composable";
306
306
  import { useVModel } from "../../composables/Commons/vModel.composable";
307
307
  import { IN_BROWSER } from "../../consts/Commons/commons.const";
308
308
  import { ORIGAM_FORM_KEY } from "../../consts/Form/form.const";
309
+ import { MENU_WRAPPER_ARIA_RESET } from "../../consts/Menu/menu.const";
309
310
  import { BLOCK } from "../../enums/Commons/anchor.enum";
310
311
  import { DENSITY } from "../../enums/Commons/density.enum";
311
312
  import { DIRECTION } from "../../enums/Commons/direction.enum";
@@ -585,9 +586,7 @@ const menuProps = computed(() => {
585
586
  * suppresses the defaults.
586
587
  ********************************************************/
587
588
  activatorProps: {
588
- "aria-haspopup": void 0,
589
- "aria-expanded": void 0,
590
- "aria-owns": void 0,
589
+ ...MENU_WRAPPER_ARIA_RESET,
591
590
  ...consumerProps.activatorProps ?? {}
592
591
  },
593
592
  contentProps: {
@@ -3,5 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ORIGAM_MENU_KEY = void 0;
7
- const ORIGAM_MENU_KEY = exports.ORIGAM_MENU_KEY = /* @__PURE__ */Symbol.for("origam:menu");
6
+ exports.ORIGAM_MENU_KEY = exports.MENU_WRAPPER_ARIA_RESET = void 0;
7
+ const ORIGAM_MENU_KEY = exports.ORIGAM_MENU_KEY = /* @__PURE__ */Symbol.for("origam:menu");
8
+ const MENU_WRAPPER_ARIA_RESET = exports.MENU_WRAPPER_ARIA_RESET = {
9
+ "aria-haspopup": void 0,
10
+ "aria-expanded": void 0,
11
+ "aria-owns": void 0
12
+ };
@@ -1,3 +1,16 @@
1
1
  import type { InjectionKey } from 'vue';
2
2
  import type { IMenuProvide } from '../../interfaces/Menu/menu.interface';
3
3
  export declare const ORIGAM_MENU_KEY: InjectionKey<IMenuProvide>;
4
+ /*********************************************************
5
+ * Menu wrapper ARIA reset — #1247 / #1308
6
+ *
7
+ * @description
8
+ * Neutralises OrigamMenu's default aria-haspopup/expanded/owns on a role-less
9
+ * `activator="parent"` wrapper (`.origam-field`); `undefined` suppresses them.
10
+ * The combobox ARIA lives on the field's <input>.
11
+ ********************************************************/
12
+ export declare const MENU_WRAPPER_ARIA_RESET: {
13
+ readonly 'aria-haspopup': undefined;
14
+ readonly 'aria-expanded': undefined;
15
+ readonly 'aria-owns': undefined;
16
+ };
@@ -1 +1,6 @@
1
1
  export const ORIGAM_MENU_KEY = /* @__PURE__ */ Symbol.for("origam:menu");
2
+ export const MENU_WRAPPER_ARIA_RESET = {
3
+ "aria-haspopup": void 0,
4
+ "aria-expanded": void 0,
5
+ "aria-owns": void 0
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "origam",
3
- "version": "2.37.29",
3
+ "version": "2.37.30",
4
4
  "type": "module",
5
5
  "description": "origam — a Vue 3 design system with multi-theme design tokens, CSS-first components and TypeScript types.",
6
6
  "keywords": [