@cnamts/synapse 1.0.22 → 1.0.23
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/dist/{DateFilter-B5n-ZkLi.js → DateFilter-Dc-gSGwk.js} +1 -1
- package/dist/{NumberFilter-CtiZ9uj8.js → NumberFilter-vP38Wp6j.js} +1 -1
- package/dist/{PeriodFilter-DzqiMb-b.js → PeriodFilter-Ba1uYUnT.js} +1 -1
- package/dist/{SelectFilter-BOYlF7rX.js → SelectFilter-BioGT6Nn.js} +1 -1
- package/dist/{TextFilter-BOFRNfcX.js → TextFilter-B84dpnoq.js} +1 -1
- package/dist/components/Accordion/Accordion.d.ts +13 -2
- package/dist/components/Accordion/composables/useAccordionState.d.ts +2 -1
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +7 -7
- package/dist/components/Amelipro/AmeliproCheckbox/AmeliproCheckbox.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproCustomSelector/AmeliproCustomSelector.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproPostalAddressField/AmeliproPostalAddressField.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +7 -7
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +16 -16
- package/dist/components/Amelipro/AmeliproTextArea/AmeliproTextArea.d.ts +1 -1
- package/dist/components/Amelipro/AmeliproTextField/AmeliproTextField.d.ts +1 -1
- package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +22 -1
- package/dist/components/Customs/Selects/SyAutocomplete/locales.d.ts +5 -0
- package/dist/components/Customs/Selects/SyInputSelect/SyInputSelect.d.ts +1 -1
- package/dist/components/Customs/Selects/SySelect/SySelect.d.ts +1 -1
- package/dist/components/Customs/Selects/SySelect/locales.d.ts +1 -0
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +1 -1
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1 -1
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1 -1
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +5 -2
- package/dist/components/DatePicker/CalendarMode/DatePicker.d.ts +13 -9
- package/dist/components/DatePicker/ComplexDatePicker/ComplexDatePicker.d.ts +7 -5
- package/dist/components/DatePicker/DateTextInput/DateTextInput.d.ts +2 -1
- package/dist/components/ErrorPage/ErrorPage.d.ts +3 -1
- package/dist/components/FileList/UploadItem/UploadItem.d.ts +6 -0
- package/dist/components/FileList/UploadItem/locales.d.ts +1 -4
- package/dist/components/FileUpload/FileUploadContent.d.ts +2 -0
- package/dist/components/FileUpload/validateFiles.d.ts +2 -1
- package/dist/components/HeaderBar/HeaderBar.d.ts +2 -1
- package/dist/components/HeaderBar/HeaderLogo/HeaderLogo.d.ts +2 -1
- package/dist/components/HeaderNavigationBar/HeaderNavigationBar.d.ts +2 -1
- package/dist/components/MonthPicker/MonthPicker.d.ts +1939 -0
- package/dist/components/MonthPicker/MonthPickerText/MonthPickerInput.d.ts +1899 -0
- package/dist/components/MonthPicker/MonthPickerText/useTextField.d.ts +21 -0
- package/dist/components/MonthPicker/MonthPickerVisual/MonthPickerVisual.d.ts +21 -0
- package/dist/components/MonthPicker/MonthPickerVisual/MonthPickerVisualProps.d.ts +12 -0
- package/dist/components/MonthPicker/MonthPickerVisual/MonthSelector.d.ts +11 -0
- package/dist/components/MonthPicker/MonthPickerVisual/VisualPickerFooter.d.ts +6 -0
- package/dist/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.d.ts +14 -0
- package/dist/components/MonthPicker/MonthPickerVisual/YearSelector.d.ts +14 -0
- package/dist/components/MonthPicker/MonthPickerVisual/useMonthGrid.d.ts +9 -0
- package/dist/components/MonthPicker/MonthPickerVisual/useYearGrid.d.ts +8 -0
- package/dist/components/MonthPicker/MonthPickerVisual/utils.d.ts +8 -0
- package/dist/components/MonthPicker/locales.d.ts +12 -0
- package/dist/components/MonthPicker/useMonthPickerValidation.d.ts +25 -0
- package/dist/components/NirField/NirField.d.ts +3 -1
- package/dist/components/NotificationBar/Notification/Notification.d.ts +3 -0
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PeriodField/PeriodField.d.ts +29 -21
- package/dist/components/PhoneField/PhoneField.d.ts +2 -1
- package/dist/components/SyBtnMenu/SyBtnMenu.d.ts +1 -1
- package/dist/components/SyHeading/SyHeading.a11y.test.d.ts +1 -0
- package/dist/components/SyHeading/SyHeading.d.ts +4 -2
- package/dist/components/SyHeading/SyHeading.test.d.ts +1 -0
- package/dist/components/SyTextArea/SyTextArea.d.ts +1 -1
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +4 -4
- package/dist/components/Tables/SyTable/SyTable.d.ts +4 -4
- package/dist/components/Tables/common/SyTablePagination.d.ts +6 -6
- package/dist/components/index.d.ts +1 -0
- package/dist/design-system-v3.js +102 -99
- package/dist/design-system-v3.umd.cjs +126 -126
- package/dist/designTokens/tokens/cnam/cnamContextual.d.ts +5 -0
- package/dist/{main-CEl4J8_T.js → main-aLKwdMi1.js} +11167 -10522
- package/dist/main.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +10 -4
- package/src/assets/apTokens.scss +2 -2
- package/src/assets/overrides/_btns.scss +8 -0
- package/src/assets/overrides/_forms.scss +9 -0
- package/src/assets/overrides/_icons.scss +38 -9
- package/src/assets/overrides/_tables.scss +19 -0
- package/src/components/Accordion/Accordion.mdx +23 -9
- package/src/components/Accordion/Accordion.stories.ts +153 -3
- package/src/components/Accordion/Accordion.vue +7 -6
- package/src/components/Accordion/composables/__tests__/useAccordionState.spec.ts +40 -12
- package/src/components/Accordion/composables/useAccordionState.ts +3 -4
- package/src/components/Accordion/tests/accordion.spec.ts +131 -19
- package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.mdx +3 -1
- package/src/components/Amelipro/AmeliproPagination/AmeliproPagination.stories.ts +8 -0
- package/src/components/BackBtn/accessibilite/Accessibility.mdx +62 -10
- package/src/components/BackToTopBtn/BackToTopBtn.stories.ts +9 -3
- package/src/components/BackToTopBtn/accessibilite/Accessibility.mdx +86 -6
- package/src/components/Captcha/tests/Captcha.spec.ts +0 -29
- package/src/components/Captcha/tests/__snapshots__/Captcha.spec.ts.snap +2 -110
- package/src/components/Customs/Selects/SelectBtnField/accessibilite/Accessibility.mdx +133 -10
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +379 -93
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +144 -83
- package/src/components/Customs/Selects/SyAutocomplete/accessibilite/Accessibilite.stories.ts +40 -1
- package/src/components/Customs/Selects/SyAutocomplete/accessibilite/Accessibility.mdx +7 -1
- package/src/components/Customs/Selects/SyAutocomplete/locales.ts +5 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +96 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +234 -9
- package/src/components/Customs/Selects/SyAutocomplete/utils/ariaManager.ts +13 -3
- package/src/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.ts +9 -10
- package/src/components/Customs/Selects/SySelect/SySelect.vue +46 -3
- package/src/components/Customs/Selects/SySelect/locales.ts +1 -0
- package/src/components/Customs/SyIcon/SyIcon.vue +1 -1
- package/src/components/Customs/SyIcon/tests/SyIcon.a11y.spec.ts +20 -0
- package/src/components/Customs/SyIconButton/SyIconButton.mdx +46 -0
- package/src/components/Customs/SyIconButton/SyIconButton.stories.ts +184 -0
- package/src/components/Customs/SyIconButton/SyIconButton.vue +38 -0
- package/src/components/Customs/SyIconButton/accessibilite/Accessibility.mdx +64 -0
- package/src/components/Customs/SyIconButton/tests/SyIconButton.a11y.spec.ts +87 -0
- package/src/components/Customs/SyIconButton/tests/SyIconButton.spec.ts +152 -0
- package/src/components/Customs/SyIconButton/tests/__snapshots__/SyIconButton.spec.ts.snap +61 -0
- package/src/components/Customs/SyPagination/SyPagination.vue +5 -5
- package/src/components/Customs/SyTextField/SyTextField.vue +20 -2
- package/src/components/Customs/SyTextField/accessibilite/Accessibility.mdx +67 -9
- package/src/components/Customs/SyTextField/tests/SyTextField.a11y.spec.ts +15 -0
- package/src/components/Customs/SyTextField/tests/SyTextField.spec.ts +36 -0
- package/src/components/DataList/accessibilite/Accessibility.mdx +79 -11
- package/src/components/DataListGroup/accessibilite/Accessibility.mdx +80 -11
- package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +25 -0
- package/src/components/ErrorPage/ErrorPage.stories.ts +113 -19
- package/src/components/ErrorPage/ErrorPage.vue +17 -2
- package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +17 -0
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +21 -1
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +0 -1
- package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +23 -0
- package/src/components/FileList/FileList.stories.ts +51 -1
- package/src/components/FileList/UploadItem/UploadItem.vue +13 -6
- package/src/components/FileList/UploadItem/locales.ts +3 -12
- package/src/components/FileList/accessibilite/Accessibility.mdx +3 -0
- package/src/components/FileUpload/FileUpload.vue +2 -1
- package/src/components/FileUpload/FileUploadContent.vue +2 -1
- package/src/components/FileUpload/tests/FileUpload.spec.ts +47 -0
- package/src/components/FileUpload/validateFiles.ts +5 -2
- package/src/components/FranceConnectBtn/accessibilite/Accessibility.mdx +62 -9
- package/src/components/HeaderBar/HeaderBar.vue +2 -1
- package/src/components/HeaderBar/HeaderLogo/HeaderLogo.vue +2 -1
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.vue +2 -1
- package/src/components/LunarCalendar/accessibilite/Accessibility.mdx +74 -8
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +163 -0
- package/src/components/MaintenancePage/MaintenancePage.vue +1 -1
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +4 -5
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +0 -1
- package/src/components/MonthPicker/MonthPicker.mdx +35 -0
- package/src/components/MonthPicker/MonthPicker.stories.ts +527 -0
- package/src/components/MonthPicker/MonthPicker.vue +79 -0
- package/src/components/MonthPicker/MonthPickerText/MonthPickerInput.vue +89 -0
- package/src/components/MonthPicker/MonthPickerText/useTextField.ts +27 -0
- package/src/components/MonthPicker/MonthPickerVisual/MonthPickerVisual.vue +154 -0
- package/src/components/MonthPicker/MonthPickerVisual/MonthPickerVisualProps.ts +13 -0
- package/src/components/MonthPicker/MonthPickerVisual/MonthSelector.vue +137 -0
- package/src/components/MonthPicker/MonthPickerVisual/VisualPickerFooter.vue +60 -0
- package/src/components/MonthPicker/MonthPickerVisual/VisualPickerHeader.vue +149 -0
- package/src/components/MonthPicker/MonthPickerVisual/YearSelector.vue +143 -0
- package/src/components/MonthPicker/MonthPickerVisual/useMonthGrid.ts +45 -0
- package/src/components/MonthPicker/MonthPickerVisual/useYearGrid.ts +45 -0
- package/src/components/MonthPicker/MonthPickerVisual/utils.ts +17 -0
- package/src/components/MonthPicker/accessibilite/Accessibility.mdx +59 -0
- package/src/components/MonthPicker/locales.ts +12 -0
- package/src/components/MonthPicker/tests/MonthPicker.a11y.spec.ts +71 -0
- package/src/components/MonthPicker/tests/MonthPicker.spec.ts +1248 -0
- package/src/components/MonthPicker/tests/__snapshots__/MonthPicker.spec.ts.snap +2545 -0
- package/src/components/MonthPicker/useMonthPickerValidation.ts +30 -0
- package/src/components/NirField/NirField.mdx +1 -2
- package/src/components/NirField/NirField.stories.ts +66 -6
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +2 -3
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +22 -14
- package/src/components/NotificationBar/Notification/Notification.vue +3 -1
- package/src/components/NotificationBar/NotificationBar.stories.ts +154 -0
- package/src/components/NotificationBar/tests/NotificationBar.a11y.spec.ts +26 -0
- package/src/components/NotificationBar/tests/NotificationBar.spec.ts +60 -0
- package/src/components/RangeField/accessibilite/Accessibility.mdx +79 -11
- package/src/components/SkipLink/tests/SkipLink.a11y.spec.ts +23 -0
- package/src/components/StatusPage/StatusPage.stories.ts +118 -0
- package/src/components/StatusPage/StatusPage.vue +5 -3
- package/src/components/StatusPage/tests/StatusPage.a11y.spec.ts +22 -0
- package/src/components/StatusPage/tests/StatusPage.spec.ts +22 -0
- package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +22 -14
- package/src/components/SubHeader/tests/SubHeader.a11y.spec.ts +20 -0
- package/src/components/SyAlert/SyAlert.vue +1 -0
- package/src/components/SyAlert/accessibilite/Accessibility.mdx +79 -9
- package/src/components/SyAlert/tests/SyAlert.a11y.spec.ts +23 -0
- package/src/components/SyHeading/SyHeading.a11y.test.ts +149 -0
- package/src/components/SyHeading/SyHeading.test.ts +115 -0
- package/src/components/SyHeading/SyHeading.vue +5 -3
- package/src/components/SyTextArea/accessibilite/Accessibility.mdx +80 -8
- package/src/components/SyTextArea/tests/SyTextArea.a11y.spec.ts +151 -0
- package/src/components/ToolbarContainer/tests/ToolbarContainer.a11y.spec.ts +126 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +2 -2
- package/src/components/index.ts +1 -0
- package/src/composables/useFormFieldErrorHandling.ts +11 -2
- package/src/designTokens/tokens/cnam/cnamContextual.ts +6 -1
- package/src/main.ts +2 -0
|
@@ -100,61 +100,7 @@ exports[`Captcha > renders correctly in audio mode 1`] = `
|
|
|
100
100
|
">
|
|
101
101
|
<div class="v-field__overlay"></div>
|
|
102
102
|
<div class="v-field__loader">
|
|
103
|
-
|
|
104
|
-
aria-hidden="true"
|
|
105
|
-
aria-valuemax="100"
|
|
106
|
-
aria-valuemin="0"
|
|
107
|
-
class="
|
|
108
|
-
v-locale--is-ltr
|
|
109
|
-
v-progress-linear
|
|
110
|
-
v-theme--light
|
|
111
|
-
"
|
|
112
|
-
role="progressbar"
|
|
113
|
-
style="
|
|
114
|
-
top: 0px;
|
|
115
|
-
height: 0px;
|
|
116
|
-
--v-progress-linear-height: 2px;
|
|
117
|
-
"
|
|
118
|
-
>
|
|
119
|
-
<!---->
|
|
120
|
-
<div
|
|
121
|
-
class="
|
|
122
|
-
bg-primary
|
|
123
|
-
v-progress-linear__background
|
|
124
|
-
"
|
|
125
|
-
style="opacity: NaN;"
|
|
126
|
-
></div>
|
|
127
|
-
<div
|
|
128
|
-
class="
|
|
129
|
-
bg-primary
|
|
130
|
-
v-progress-linear__buffer
|
|
131
|
-
"
|
|
132
|
-
style="
|
|
133
|
-
opacity: NaN;
|
|
134
|
-
width: 0%;
|
|
135
|
-
"
|
|
136
|
-
></div>
|
|
137
|
-
<transition-stub
|
|
138
|
-
appear="false"
|
|
139
|
-
css="true"
|
|
140
|
-
name="fade-transition"
|
|
141
|
-
persisted="false"
|
|
142
|
-
>
|
|
143
|
-
<div class="v-progress-linear__indeterminate">
|
|
144
|
-
<div class="
|
|
145
|
-
bg-primary
|
|
146
|
-
long
|
|
147
|
-
v-progress-linear__indeterminate
|
|
148
|
-
"></div>
|
|
149
|
-
<div class="
|
|
150
|
-
bg-primary
|
|
151
|
-
short
|
|
152
|
-
v-progress-linear__indeterminate
|
|
153
|
-
"></div>
|
|
154
|
-
</div>
|
|
155
|
-
</transition-stub>
|
|
156
|
-
<!---->
|
|
157
|
-
</div>
|
|
103
|
+
<!-- v-if -->
|
|
158
104
|
</div>
|
|
159
105
|
<div class="v-field__prepend-inner">
|
|
160
106
|
<!-- v-if -->
|
|
@@ -496,61 +442,7 @@ exports[`Captcha > renders correctly in image mode 1`] = `
|
|
|
496
442
|
">
|
|
497
443
|
<div class="v-field__overlay"></div>
|
|
498
444
|
<div class="v-field__loader">
|
|
499
|
-
|
|
500
|
-
aria-hidden="true"
|
|
501
|
-
aria-valuemax="100"
|
|
502
|
-
aria-valuemin="0"
|
|
503
|
-
class="
|
|
504
|
-
v-locale--is-ltr
|
|
505
|
-
v-progress-linear
|
|
506
|
-
v-theme--light
|
|
507
|
-
"
|
|
508
|
-
role="progressbar"
|
|
509
|
-
style="
|
|
510
|
-
top: 0px;
|
|
511
|
-
height: 0px;
|
|
512
|
-
--v-progress-linear-height: 2px;
|
|
513
|
-
"
|
|
514
|
-
>
|
|
515
|
-
<!---->
|
|
516
|
-
<div
|
|
517
|
-
class="
|
|
518
|
-
bg-primary
|
|
519
|
-
v-progress-linear__background
|
|
520
|
-
"
|
|
521
|
-
style="opacity: NaN;"
|
|
522
|
-
></div>
|
|
523
|
-
<div
|
|
524
|
-
class="
|
|
525
|
-
bg-primary
|
|
526
|
-
v-progress-linear__buffer
|
|
527
|
-
"
|
|
528
|
-
style="
|
|
529
|
-
opacity: NaN;
|
|
530
|
-
width: 0%;
|
|
531
|
-
"
|
|
532
|
-
></div>
|
|
533
|
-
<transition-stub
|
|
534
|
-
appear="false"
|
|
535
|
-
css="true"
|
|
536
|
-
name="fade-transition"
|
|
537
|
-
persisted="false"
|
|
538
|
-
>
|
|
539
|
-
<div class="v-progress-linear__indeterminate">
|
|
540
|
-
<div class="
|
|
541
|
-
bg-primary
|
|
542
|
-
long
|
|
543
|
-
v-progress-linear__indeterminate
|
|
544
|
-
"></div>
|
|
545
|
-
<div class="
|
|
546
|
-
bg-primary
|
|
547
|
-
short
|
|
548
|
-
v-progress-linear__indeterminate
|
|
549
|
-
"></div>
|
|
550
|
-
</div>
|
|
551
|
-
</transition-stub>
|
|
552
|
-
<!---->
|
|
553
|
-
</div>
|
|
445
|
+
<!-- v-if -->
|
|
554
446
|
</div>
|
|
555
447
|
<div class="v-field__prepend-inner">
|
|
556
448
|
<!-- v-if -->
|
|
@@ -1,15 +1,138 @@
|
|
|
1
|
-
import { Meta,
|
|
1
|
+
import { Meta, Primary } from '@storybook/blocks';
|
|
2
2
|
import * as Stories from '../SelectBtnField.stories.ts';
|
|
3
|
-
import '@/
|
|
3
|
+
import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
|
|
4
|
+
import {
|
|
5
|
+
AccessibilityGuideLayout,
|
|
6
|
+
CriteriaSection,
|
|
7
|
+
CriteriaCard,
|
|
8
|
+
DemoSection,
|
|
9
|
+
BestPracticesSection,
|
|
10
|
+
ResourcesSection,
|
|
11
|
+
} from '@/stories/accessibility/AccessibilityGuideLayout.mdx';
|
|
4
12
|
|
|
5
|
-
<Meta of={Stories}
|
|
13
|
+
<Meta of={Stories}/>
|
|
6
14
|
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
<AccessibilityGuideLayout
|
|
16
|
+
componentName="SelectBtnField"
|
|
17
|
+
iconSrc={AccessibilityIcon}
|
|
18
|
+
apgHref="https://www.w3.org/WAI/ARIA/apg/patterns/listbox/"
|
|
19
|
+
>
|
|
10
20
|
|
|
21
|
+
## Critères d'accessibilité
|
|
11
22
|
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
<CriteriaSection>
|
|
24
|
+
|
|
25
|
+
<CriteriaCard title="Structure sémantique">
|
|
26
|
+
- **Rôle listbox** : Utilise `role="listbox"` sur le conteneur principal pour identifier une liste de sélection
|
|
27
|
+
- **Rôle option** : Chaque élément utilise `role="option"` pour identifier les options sélectionnables
|
|
28
|
+
- **Labels** : Supporte `aria-label` et `aria-labelledby` pour l'étiquetage du composant
|
|
29
|
+
- **États** : Utilise `aria-selected` (sélection simple) et `aria-checked` (sélection multiple) pour indiquer l'état de sélection
|
|
30
|
+
</CriteriaCard>
|
|
31
|
+
|
|
32
|
+
<CriteriaCard title="Navigation au clavier">
|
|
33
|
+
- **Flèches directionnelles** : Navigation entre les options avec les flèches haut/bas ou gauche/droite selon l'orientation
|
|
34
|
+
- **Home/End** : Accès rapide à la première et dernière option
|
|
35
|
+
- **Espace** : Activation/désactivation de l'option avec la barre d'espace
|
|
36
|
+
- **Tab** : Navigation dans et hors du composant avec gestion du focus
|
|
37
|
+
- **Auto-sélection** : En mode sélection simple, l'option est automatiquement sélectionnée lors du focus clavier
|
|
38
|
+
</CriteriaCard>
|
|
39
|
+
|
|
40
|
+
<CriteriaCard title="États et feedback visuel">
|
|
41
|
+
- **Focus visible** : Style `focus-visible` avec outline clair pour l'indication du focus
|
|
42
|
+
- **États de sélection** : Changement de couleur et de fond pour l'option sélectionnée
|
|
43
|
+
- **États d'erreur** : Support des messages d'erreur avec `aria-invalid="true"`
|
|
44
|
+
- **Lecture seule** : Support du mode readonly avec `aria-readonly="true"`
|
|
45
|
+
- **Icônes décoratives** : L'icône de validation est marquée comme décorative (`decorative="true"`)
|
|
46
|
+
</CriteriaCard>
|
|
47
|
+
|
|
48
|
+
</CriteriaSection>
|
|
49
|
+
|
|
50
|
+
<DemoSection>
|
|
51
|
+
|
|
52
|
+
## Démo
|
|
53
|
+
|
|
54
|
+
Exemples d'utilisation du composant `SelectBtnField` :
|
|
55
|
+
|
|
56
|
+
```vue
|
|
57
|
+
<template>
|
|
58
|
+
<!-- Sélection simple avec label -->
|
|
59
|
+
<SelectBtnField
|
|
60
|
+
v-model="selectedOption"
|
|
61
|
+
:items="options"
|
|
62
|
+
label="Choisissez une option"
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
<!-- Sélection multiple -->
|
|
66
|
+
<SelectBtnField
|
|
67
|
+
v-model="selectedOptions"
|
|
68
|
+
:items="options"
|
|
69
|
+
:multiple="true"
|
|
70
|
+
label="Sélectionnez plusieurs options"
|
|
71
|
+
/>
|
|
72
|
+
|
|
73
|
+
<!-- Mode inline avec gestion d'erreur -->
|
|
74
|
+
<SelectBtnField
|
|
75
|
+
v-model="selectedOption"
|
|
76
|
+
:items="options"
|
|
77
|
+
:inline="true"
|
|
78
|
+
label="Options disponibles"
|
|
79
|
+
:error="hasError"
|
|
80
|
+
:error-messages="errorMessages"
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
<!-- Mode lecture seule -->
|
|
84
|
+
<SelectBtnField
|
|
85
|
+
v-model="selectedOption"
|
|
86
|
+
:items="options"
|
|
87
|
+
label="Options en lecture seule"
|
|
88
|
+
:readonly="true"
|
|
89
|
+
/>
|
|
90
|
+
</template>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
</DemoSection>
|
|
94
|
+
|
|
95
|
+
## Bonnes pratiques
|
|
96
|
+
|
|
97
|
+
<BestPracticesSection>
|
|
98
|
+
|
|
99
|
+
<CriteriaCard title="Étiquetage">
|
|
100
|
+
- **Label descriptif** : Toujours fournir un label clair via la prop `label` ou `ariaLabelledby`
|
|
101
|
+
- **Éviter les labels génériques** : Utiliser des labels qui décrivent précisément les options proposées
|
|
102
|
+
- **Contexte** : Assurer que le label donne suffisamment de contexte pour comprendre le choix à faire
|
|
103
|
+
</CriteriaCard>
|
|
104
|
+
|
|
105
|
+
<CriteriaCard title="Navigation">
|
|
106
|
+
- **Logique de sélection** : En mode sélection simple, l'auto-sélection au focus facilite l'utilisation
|
|
107
|
+
- **Mode multiple** : En mode multiple, l'utilisateur doit explicitement activer chaque option
|
|
108
|
+
- **Orientation** : Respecter l'orientation (horizontal/vertical) pour la cohérence de la navigation
|
|
109
|
+
</CriteriaCard>
|
|
110
|
+
|
|
111
|
+
<CriteriaCard title="Contenu des options">
|
|
112
|
+
- **Texte clair** : Utiliser des textes d'options concis et compréhensibles
|
|
113
|
+
- **Hiérarchie** : Organiser les options de manière logique et prévisible
|
|
114
|
+
- **États cohérents** : Maintenir une indication visuelle claire de l'état de sélection
|
|
115
|
+
</CriteriaCard>
|
|
116
|
+
|
|
117
|
+
<CriteriaCard title="Gestion des erreurs">
|
|
118
|
+
- **Messages clairs** : Fournir des messages d'erreur spécifiques et actionnables
|
|
119
|
+
- **Validation appropriée** : Valider la sélection uniquement lorsque nécessaire
|
|
120
|
+
- **Feedback immédiat** : Afficher les erreurs dès que possible après l'interaction
|
|
121
|
+
</CriteriaCard>
|
|
122
|
+
|
|
123
|
+
</BestPracticesSection>
|
|
124
|
+
|
|
125
|
+
## Ressources
|
|
126
|
+
|
|
127
|
+
<ResourcesSection>
|
|
128
|
+
|
|
129
|
+
- [WAI-ARIA Authoring Practices - Listbox](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/)
|
|
130
|
+
- [WAI-ARIA Authoring Practices - Grid](https://www.w3.org/WAI/ARIA/apg/patterns/grid/)
|
|
131
|
+
- [MDN Web Docs - ARIA: listbox role](https://developer.mozilla.org/fr/docs/Web/Accessibility/ARIA/Roles/listbox_role)
|
|
132
|
+
- [RGAA - Critère 11.9 - Listes de choix](https://www.numerique.gouv.fr/publications/rgaa-accessibilite/#critere-119-listes-de-choix)
|
|
133
|
+
- [Audit du composant](/audits/SelectBtnField.xlsx)
|
|
134
|
+
- [Correctifs associés](https://github.com/assurance-maladie-digital/design-system-v3/issues/916)
|
|
135
|
+
|
|
136
|
+
</ResourcesSection>
|
|
137
|
+
|
|
138
|
+
</AccessibilityGuideLayout>
|