@cnamts/synapse 1.0.19 → 1.0.21
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-CeVuSfJ9.js → DateFilter-uN8OURoP.js} +1 -1
- package/dist/{NumberFilter-C8PAu_sw.js → NumberFilter-sm1dQNQi.js} +1 -1
- package/dist/{PeriodFilter-UMUaxx3d.js → PeriodFilter-Cklsxnh9.js} +1 -1
- package/dist/{SelectFilter-CqZl8CYt.js → SelectFilter-CWefj27Z.js} +1 -1
- package/dist/{TextFilter-D_RhhNOh.js → TextFilter-Ddyj885L.js} +1 -1
- package/dist/components/Amelipro/AmeliproAutoCompleteField/AmeliproAutoCompleteField.d.ts +4 -4
- package/dist/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.d.ts +17 -7
- package/dist/components/Amelipro/AmeliproSelect/AmeliproSelect.d.ts +4 -4
- package/dist/components/Amelipro/AmeliproTabs/AmeliproTabs.d.ts +4 -4
- package/dist/components/Customs/Selects/SyAutocomplete/SyAutocomplete.d.ts +2416 -0
- package/dist/components/Customs/Selects/SyAutocomplete/types.d.ts +5 -0
- package/dist/components/Customs/Selects/SyAutocomplete/utils/ariaManager.d.ts +14 -0
- package/dist/components/Customs/Selects/SyAutocomplete/utils/useItemUtils.d.ts +16 -0
- package/dist/components/Customs/Selects/SyAutocomplete/utils/useKeyboardHandler.d.ts +28 -0
- package/dist/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.d.ts +12 -0
- package/dist/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.d.ts +2 -0
- package/dist/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.d.ts +160 -0
- package/dist/components/Customs/SyCheckBoxGroup/locales.d.ts +3 -0
- package/dist/components/Customs/SyCheckBoxGroup/types.d.ts +10 -0
- package/dist/components/Customs/SyCheckbox/SyCheckbox.d.ts +1545 -2
- package/dist/components/Customs/SyIcon/SyIcon.d.ts +2 -1
- package/dist/components/Customs/SyRadioGroup/SyRadioGroup.d.ts +1495 -2
- package/dist/components/DatePicker/composables/useDateSelection.d.ts +1 -0
- package/dist/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.d.ts +60 -0
- package/dist/components/ErrorPage/ErrorPage.d.ts +1 -12
- package/dist/components/ErrorPage/locales.d.ts +18 -3
- package/dist/components/FileUpload/FileUpload.d.ts +2 -0
- package/dist/components/MaintenancePage/locales.d.ts +18 -2
- package/dist/components/NotFoundPage/locales.d.ts +20 -4
- package/dist/components/PaginatedTable/PaginatedTable.d.ts +1 -1
- package/dist/components/PaginatedTable/Pagination.d.ts +17 -0
- package/dist/components/StatusPage/StatusPage.d.ts +39 -0
- package/dist/components/Tables/SyServerTable/SyServerTable.d.ts +5 -5
- package/dist/components/Tables/SyTable/SyTable.d.ts +5 -5
- package/dist/components/UploadWorkflow/UploadWorkflow.d.ts +13 -3
- package/dist/components/index.d.ts +4 -0
- package/dist/components/types.d.ts +15 -0
- package/dist/composables/useFormFieldErrorHandling.d.ts +31 -0
- package/dist/design-system-v3.js +126 -122
- package/dist/design-system-v3.umd.cjs +325 -314
- package/dist/{main-B39UVv5p.js → main-CWniLr0s.js} +15837 -14587
- package/dist/modules.d.ts +6 -0
- package/dist/style.css +1 -1
- package/dist/utils/theme/index.d.ts +6 -0
- package/package.json +12 -10
- package/src/assets/amelipro/icons.ts +166 -153
- package/src/components/Accordion/Accordion.mdx +4 -1
- package/src/components/Accordion/{Accessibilite/AccessibilityGuide.mdx → accessibilite/Accessibility.mdx} +2 -2
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.stories.ts +73 -14
- package/src/components/Amelipro/AmeliproClickableTile/AmeliproClickableTile.vue +119 -27
- package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.a11y.spec.ts +304 -0
- package/src/components/Amelipro/AmeliproClickableTile/tests/AmeliproClickableTile.spec.ts +435 -9
- package/src/components/Amelipro/AmeliproClickableTile/tests/__snapshots__/AmeliproClickableTile.spec.ts.snap +60 -0
- package/src/components/Amelipro/AmeliproIcon/__tests__/AmeliproIcon.spec.ts +1 -1
- package/src/components/Amelipro/AmeliproIcon/iconList.ts +2 -0
- package/src/components/BackBtn/BackBtn.vue +5 -4
- package/src/components/BackBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/BackToTopBtn/BackToTopBtn.vue +6 -3
- package/src/components/BackToTopBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/Captcha/Captcha.vue +5 -1
- package/src/components/Captcha/CaptchaAlert.vue +9 -7
- package/src/components/Captcha/accessibilite/Accessibility.mdx +10 -0
- package/src/components/ChipList/accessibilite/Accessibility.mdx +15 -0
- package/src/components/CollapsibleList/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +8 -6
- package/src/components/Common/IconSlot/IconSlot.vue +1 -1
- package/src/components/ContextualMenu/ContextualMenu.stories.ts +0 -3
- package/src/components/ContextualMenu/accessibilite/Accessibility.mdx +71 -0
- package/src/components/CookieBanner/CookieBanner.stories.ts +11 -20
- package/src/components/CookieBanner/CookieBanner.vue +20 -5
- package/src/components/CookieBanner/accessibilite/Accessibility.mdx +71 -0
- package/src/components/CookieBanner/tests/CookieBanner.spec.ts +48 -4
- package/src/components/CookiesSelection/CookiesInformation/CookiesInformation.vue +5 -4
- package/src/components/CopyBtn/CopyBtn.vue +6 -3
- package/src/components/CopyBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/Customs/Selects/SelectBtnField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/Customs/Selects/SelectOverview.mdx +112 -1
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.mdx +52 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.stories.ts +979 -0
- package/src/components/Customs/Selects/SyAutocomplete/SyAutocomplete.vue +653 -0
- package/src/components/Customs/Selects/{SySelect → SyAutocomplete/accessibilite}/Accessibilite.stories.ts +7 -38
- package/src/components/Customs/Selects/{SySelect/Accessibilite.mdx → SyAutocomplete/accessibilite/Accessibility.mdx} +15 -20
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.a11y.spec.ts +72 -0
- package/src/components/Customs/Selects/SyAutocomplete/tests/SyAutocomplete.spec.ts +345 -0
- package/src/components/Customs/Selects/SyAutocomplete/types.ts +7 -0
- package/src/components/Customs/Selects/SyAutocomplete/utils/ariaManager.ts +180 -0
- package/src/components/Customs/Selects/SyAutocomplete/utils/useItemUtils.ts +46 -0
- package/src/components/Customs/Selects/SyAutocomplete/utils/useKeyboardHandler.ts +107 -0
- package/src/components/Customs/Selects/SyAutocomplete/utils/useSelectionLogic.ts +74 -0
- package/src/components/Customs/Selects/SyInputSelect/SyInputSelect.vue +13 -9
- package/src/components/Customs/Selects/SyInputSelect/accessibilite/Accessibility.mdx +12 -0
- package/src/components/Customs/Selects/SySelect/SySelect.stories.ts +43 -34
- package/src/components/Customs/Selects/SySelect/SySelect.vue +19 -2
- package/src/components/Customs/Selects/SySelect/accessibilite/Accessibility.mdx +274 -0
- package/src/components/Customs/Selects/SySelect/composables/useSySelectKeyboard.ts +21 -16
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.mdx +32 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.stories.ts +856 -0
- package/src/components/Customs/SyCheckBoxGroup/SyCheckBoxGroup.vue +334 -0
- package/src/components/Customs/SyCheckBoxGroup/accessibilite/Accessibility.mdx +243 -0
- package/src/components/Customs/SyCheckBoxGroup/locales.ts +3 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.a11y.spec.ts +30 -0
- package/src/components/Customs/SyCheckBoxGroup/tests/SyCheckBoxGroup.spec.ts +152 -0
- package/src/components/Customs/SyCheckBoxGroup/types.ts +10 -0
- package/src/components/Customs/SyCheckbox/SyCheckbox.vue +16 -27
- package/src/components/Customs/SyCheckbox/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +3 -3
- package/src/components/Customs/SyForm/SyForm.a11y.spec.ts +1 -1
- package/src/components/Customs/SyForm/accessibilite/Accessibility.mdx +10 -0
- package/src/components/Customs/SyIcon/SyIcon.mdx +4 -1
- package/src/components/Customs/SyIcon/SyIcon.vue +4 -3
- package/src/components/Customs/SyIcon/{Accessibilite.stories.ts → accessibilite/Accessibilite.stories.ts} +3 -3
- package/src/components/Customs/SyIcon/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
- package/src/components/Customs/SyPagination/SyPagination.mdx +4 -2
- package/src/components/Customs/SyPagination/accessibilite/Accessibility.mdx +10 -0
- package/src/components/Customs/SyRadioGroup/SyRadioGroup.vue +16 -43
- package/src/components/Customs/SyRadioGroup/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
- package/src/components/Customs/SyTabs/SyTabs.mdx +4 -2
- package/src/components/Customs/SyTabs/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +2 -2
- package/src/components/Customs/SyTextField/SyTextField.mdx +1 -2
- package/src/components/Customs/SyTextField/SyTextField.vue +13 -0
- package/src/components/Customs/SyTextField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/DataList/accessibilite/Accessibility.mdx +15 -0
- package/src/components/DataListGroup/accessibilite/Accessibility.mdx +14 -0
- package/src/components/DatePicker/Accessibilite.mdx +1 -1
- package/src/components/DatePicker/Accessibilite.stories.ts +1 -1
- package/src/components/DatePicker/CalendarMode/DatePicker.stories.ts +7 -4
- package/src/components/DatePicker/CalendarMode/DatePicker.vue +49 -13
- package/src/components/DatePicker/ComplexDatePicker/ComplexDatePicker.stories.ts +43 -2
- package/src/components/DatePicker/DatePickerValidationExample/DatePickerValidation.stories.ts +297 -0
- package/src/components/DatePicker/DateTextInput/DateTextInput.vue +48 -21
- package/src/components/DatePicker/DateTextInput/NoCalendar.stories.ts +98 -0
- package/src/components/DatePicker/composables/useDateSelection.ts +5 -0
- package/src/components/DatePicker/docExamples/BidirectionalComplexValidation.vue +273 -0
- package/src/components/DatePicker/docExamples/DatePickerBidirectionalValidation.vue +4 -4
- package/src/components/DatePicker/docExamples/DatePickerValidationExamples.vue +10 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.mdx +83 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.stories.ts +502 -0
- package/src/components/DeclarationAccessibilityPage/DeclarationAccessibilityPage.vue +428 -0
- package/src/components/DeclarationAccessibilityPage/accessibilite/Accessibility.mdx +75 -0
- package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.a11y.spec.ts +53 -0
- package/src/components/DeclarationAccessibilityPage/tests/DeclarationAccessibilityPage.spec.ts +59 -0
- package/src/components/DiacriticPicker/DiacriticPicker.vue +20 -1
- package/src/components/DiacriticPicker/accessibilite/Accessibility.mdx +10 -0
- package/src/components/DialogBox/accessibilite/Accessibility.mdx +15 -0
- package/src/components/DownloadBtn/DownloadBtn.vue +5 -4
- package/src/components/DownloadBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/ErrorPage/ErrorPage.mdx +6 -16
- package/src/components/ErrorPage/ErrorPage.stories.ts +16 -87
- package/src/components/ErrorPage/ErrorPage.vue +38 -125
- package/src/components/ErrorPage/accessibilite/Accessibility.mdx +77 -0
- package/src/components/ErrorPage/assets/error-ap.svg +1774 -0
- package/src/components/ErrorPage/locales.ts +21 -3
- package/src/components/ErrorPage/tests/ErrorPage.a11y.spec.ts +5 -13
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +2 -41
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +8 -266
- package/src/components/ExternalLinks/accessibilite/Accessibility.mdx +15 -0
- package/src/components/FileList/UploadItem/UploadItem.vue +25 -20
- package/src/components/FileList/accessibilite/Accessibility.mdx +12 -0
- package/src/components/FilePreview/accessibilite/Accessibility.mdx +12 -0
- package/src/components/FileUpload/FileUpload.vue +5 -0
- package/src/components/FileUpload/FileUploadContent.vue +5 -4
- package/src/components/FileUpload/accessibilite/Accessibility.mdx +12 -0
- package/src/components/FilterInline/FilterInline.vue +5 -4
- package/src/components/FilterInline/accessibilite/Accessibility.mdx +12 -0
- package/src/components/FilterSideBar/accessibilite/Accessibility.mdx +15 -0
- package/src/components/FooterBar/FooterBar.stories.ts +18 -14
- package/src/components/FooterBar/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +3 -4
- package/src/components/FooterBar/defaultSocialMediaLinks.ts +6 -4
- package/src/components/FranceConnectBtn/FranceConnectBtn.vue +6 -5
- package/src/components/FranceConnectBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/FranceConnectBtn/tests/__snapshots__/FranceConnectBtn.spec.ts.snap +3 -0
- package/src/components/HeaderBar/HeaderBurgerMenu/accessibilite/Accessibility.mdx +15 -0
- package/src/components/HeaderBar/accessibilite/Accessibility.mdx +15 -0
- package/src/components/HeaderBar/{Usages.mdx → usages/Usages.mdx} +2 -2
- package/src/components/HeaderLoading/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +9 -5
- package/src/components/HeaderToolbar/accessibilite/Accessibility.mdx +15 -0
- package/src/components/LangBtn/LangBtn.vue +5 -4
- package/src/components/LangBtn/accessibilite/Accessibility.mdx +15 -0
- package/src/components/Logo/accessibilite/Accessibility.mdx +17 -0
- package/src/components/LogoBrandSection/accessibilite/Accessibility.mdx +12 -0
- package/src/components/LunarCalendar/accessibilite/Accessibility.mdx +10 -0
- package/src/components/MaintenancePage/MaintenancePage.mdx +1 -1
- package/src/components/MaintenancePage/MaintenancePage.vue +15 -7
- package/src/components/MaintenancePage/accessibilite/Accessibility.mdx +70 -0
- package/src/components/MaintenancePage/assets/maintenance-ap.svg +1718 -0
- package/src/components/MaintenancePage/locales.ts +24 -3
- package/src/components/MaintenancePage/tests/MaintenancePage.a11y.spec.ts +75 -3
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +42 -2
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -2
- package/src/components/NirField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/NotFoundPage/NotFoundPage.mdx +1 -1
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +3 -3
- package/src/components/NotFoundPage/NotFoundPage.vue +16 -11
- package/src/components/NotFoundPage/accessibilite/Accessibility.mdx +87 -0
- package/src/components/NotFoundPage/assets/not-found-ap.svg +2061 -0
- package/src/components/NotFoundPage/locales.ts +24 -4
- package/src/components/NotFoundPage/tests/NotFoundPage.a11y.spec.ts +168 -4
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +100 -12
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +2 -2
- package/src/components/NotificationBar/Notification/Notification.vue +1 -1
- package/src/components/NotificationBar/NotificationBar.mdx +2 -2
- package/src/components/NotificationBar/accessibilite/Accessibility.mdx +75 -0
- package/src/components/PageContainer/{AccessibilityGuide.mdx → accessibilite/Accessibility.mdx} +7 -4
- package/src/components/PageContainer/tests/PageContainer.a11y.spec.ts +14 -7
- package/src/components/PaginatedTable/PaginatedTable.vue +27 -47
- package/src/components/PaginatedTable/Pagination.vue +93 -0
- package/src/components/PaginatedTable/accessibilite/Accessibility.mdx +12 -0
- package/src/components/PasswordField/PasswordField.vue +2 -1
- package/src/components/PasswordField/accessibilite/Accessibility.mdx +108 -0
- package/src/components/PeriodField/accessibilite/Accessibility.mdx +12 -0
- package/src/components/PhoneField/PhoneField.stories.ts +46 -38
- package/src/components/PhoneField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/RangeField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/RatingPicker/accessibilite/Accessibility.mdx +15 -0
- package/src/components/SearchListField/SearchListField.vue +6 -3
- package/src/components/SearchListField/accessibilite/Accessibility.mdx +15 -0
- package/src/components/SkipLink/{Accessibilite.mdx → accessibilite/Accessibility.mdx} +7 -4
- package/src/components/SocialMediaLinks/DefaultSocialMediaLinks.ts +6 -4
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +7 -5
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +17 -13
- package/src/components/SocialMediaLinks/SocialMediaLinks.vue +9 -1
- package/src/components/SocialMediaLinks/accessibilite/Accessibility.mdx +67 -0
- package/src/components/SocialMediaLinks/tests/DefaultSocialMediaLinks.spec.ts +5 -5
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.a11y.spec.ts +59 -0
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +9 -7
- package/src/components/StatusPage/StatusPage.mdx +22 -0
- package/src/components/StatusPage/StatusPage.stories.ts +193 -0
- package/src/components/StatusPage/StatusPage.vue +145 -0
- package/src/components/StatusPage/accessibilite/Accessibility.mdx +81 -0
- package/src/components/StatusPage/tests/StatusPage.a11y.spec.ts +29 -0
- package/src/components/StatusPage/tests/StatusPage.spec.ts +50 -0
- package/src/components/StatusPage/tests/__snapshots__/StatusPage.spec.ts.snap +270 -0
- package/src/components/SubHeader/accessibilite/Accessibility.mdx +15 -0
- package/src/components/SyAlert/SyAlert.vue +6 -6
- package/src/components/SyAlert/accessibilite/Accessibility.mdx +12 -0
- package/src/components/SyTextArea/accessibilite/Accessibility.mdx +10 -0
- package/src/components/TableToolbar/TableToolbar.stories.ts +6 -6
- package/src/components/TableToolbar/TableToolbar.vue +7 -4
- package/src/components/TableToolbar/accessibilite/Accessibility.mdx +12 -0
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +0 -5
- package/src/components/Tables/SyServerTable/SyServerTable.mdx +4 -1
- package/src/components/Tables/SyServerTable/accessibilite/Accessibility.mdx +10 -0
- package/src/components/Tables/SyTable/SyTable.mdx +4 -1
- package/src/components/Tables/SyTable/accessibilite/Accessibility.mdx +10 -0
- package/src/components/Tables/common/TableHeader.vue +3 -1
- package/src/components/Tables/common/organizeColumns/OrganizeColumns.vue +18 -14
- package/src/components/ToolbarContainer/ToolbarContainer.mdx +2 -1
- package/src/components/ToolbarContainer/ToolbarContainer.stories.ts +563 -420
- package/src/components/ToolbarContainer/accessibilite/Accessibility.mdx +69 -0
- package/src/components/UploadWorkflow/UploadWorkflow.mdx +11 -1
- package/src/components/UploadWorkflow/UploadWorkflow.stories.ts +107 -3
- package/src/components/UploadWorkflow/UploadWorkflow.vue +35 -24
- package/src/components/UploadWorkflow/accessibilite/Accessibility.mdx +12 -0
- package/src/components/UploadWorkflow/tests/UploadWorkflow.spec.ts +48 -0
- package/src/components/UploadWorkflow/tests/__snapshots__/UploadWorkflow.spec.ts.snap +9 -5
- package/src/components/UploadWorkflow/useFileList.ts +7 -0
- package/src/components/Usages/Usages.vue +3 -2
- package/src/components/UserMenuBtn/UserMenuBtn.vue +7 -5
- package/src/components/UserMenuBtn/accessibilite/Accessibility.mdx +12 -0
- package/src/components/index.ts +5 -0
- package/src/components/types.ts +10 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +39 -3
- package/src/composables/rules/useFieldValidation.ts +31 -9
- package/src/composables/useFormFieldErrorHandling.ts +141 -0
- package/src/modules.d.ts +6 -0
- package/src/stories/Accessibilite/KitDePreAudit/Preaudit.mdx +7 -0
- package/src/utils/theme/index.ts +19 -0
- package/src/utils/theme/tests/useThemeLocales.spec.ts +245 -0
- package/dist/components/MaintenancePage/index.d.ts +0 -2
- package/src/components/BackBtn/Accessibilite.mdx +0 -14
- package/src/components/BackBtn/Accessibilite.stories.ts +0 -30
- package/src/components/BackToTopBtn/Accessibilite.mdx +0 -14
- package/src/components/BackToTopBtn/Accessibilite.stories.ts +0 -31
- package/src/components/ChipList/Accessibilite.mdx +0 -14
- package/src/components/ChipList/Accessibilite.stories.ts +0 -31
- package/src/components/CollapsibleList/Accessibilite.stories.ts +0 -29
- package/src/components/ContextualMenu/Accessibilite.mdx +0 -13
- package/src/components/ContextualMenu/Accessibilite.stories.ts +0 -29
- package/src/components/CookieBanner/Accessibilite.mdx +0 -13
- package/src/components/CookieBanner/Accessibilite.stories.ts +0 -30
- package/src/components/CopyBtn/Accessibilite.mdx +0 -13
- package/src/components/CopyBtn/Accessibilite.stories.ts +0 -29
- package/src/components/Customs/Selects/SelectBtnField/Accessibilite.mdx +0 -14
- package/src/components/Customs/Selects/SelectBtnField/Accessibilite.stories.ts +0 -29
- package/src/components/Customs/Selects/SyInputSelect/Accessibilite.mdx +0 -13
- package/src/components/Customs/Selects/SyInputSelect/Accessibilite.stories.ts +0 -25
- package/src/components/Customs/SyPagination/tests/SyPagination.a11y.spec.ts +0 -27
- package/src/components/Customs/SyTabs/tests/SyTabs.a11y.spec.ts +0 -51
- package/src/components/Customs/SyTextField/Accessibilite.mdx +0 -14
- package/src/components/Customs/SyTextField/Accessibilite.stories.ts +0 -34
- package/src/components/DataList/Accessibilite.mdx +0 -13
- package/src/components/DataList/Accessibilite.stories.ts +0 -29
- package/src/components/DataListGroup/Accessibilite.mdx +0 -13
- package/src/components/DataListGroup/Accessibilite.stories.ts +0 -29
- package/src/components/DataListItem/tests/DataListItem.a11y.spec.ts +0 -31
- package/src/components/DatePicker/CalendarMode/tests/DatePicker.a11y.spec.ts +0 -27
- package/src/components/DatePicker/ComplexDatePicker/tests/ComplexDatePicker.a11y.spec.ts +0 -26
- package/src/components/DatePicker/DateTextInput/tests/DateTextInput.a11y.spec.ts +0 -27
- package/src/components/DialogBox/Accessibilite.mdx +0 -14
- package/src/components/DialogBox/Accessibilite.stories.ts +0 -29
- package/src/components/DownloadBtn/Accessibilite.mdx +0 -14
- package/src/components/DownloadBtn/Accessibilite.stories.ts +0 -29
- package/src/components/DownloadBtn/tests/DownloadBtn.a11y.spec.ts +0 -26
- package/src/components/ErrorPage/Accessibilite.mdx +0 -13
- package/src/components/ErrorPage/Accessibilite.stories.ts +0 -36
- package/src/components/ExternalLinks/Accessibilite.mdx +0 -18
- package/src/components/ExternalLinks/Accessibilite.stories.ts +0 -62
- package/src/components/ExternalLinks/tests/ExternalLinks.a11y.spec.ts +0 -39
- package/src/components/FileList/Accessibilite.mdx +0 -13
- package/src/components/FileList/Accessibilite.stories.ts +0 -26
- package/src/components/FilePreview/Accessibilite.mdx +0 -14
- package/src/components/FilePreview/Accessibilite.stories.ts +0 -26
- package/src/components/FileUpload/Accessibilite.mdx +0 -13
- package/src/components/FileUpload/Accessibilite.stories.ts +0 -26
- package/src/components/FilterInline/Accessibilite.mdx +0 -15
- package/src/components/FilterInline/Accessibilite.stories.ts +0 -26
- package/src/components/FilterSideBar/Accessibilite.mdx +0 -13
- package/src/components/FilterSideBar/Accessibilite.stories.ts +0 -30
- package/src/components/FooterBar/Accessibilite.stories.ts +0 -26
- package/src/components/FranceConnectBtn/Accessibilite.mdx +0 -13
- package/src/components/FranceConnectBtn/Accessibilite.stories.ts +0 -30
- package/src/components/HeaderBar/Accessibilite.mdx +0 -13
- package/src/components/HeaderBar/Accessibilite.stories.ts +0 -31
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.mdx +0 -13
- package/src/components/HeaderBar/HeaderBurgerMenu/Accessibilite.stories.ts +0 -30
- package/src/components/HeaderLoading/Accessibilite.stories.ts +0 -31
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.a11y.spec.ts +0 -45
- package/src/components/HeaderToolbar/Accessibilite.mdx +0 -13
- package/src/components/HeaderToolbar/Accessibilite.stories.ts +0 -36
- package/src/components/HeaderToolbar/tests/HeaderToolbar.a11y.spec.ts +0 -25
- package/src/components/LangBtn/Accessibilite.mdx +0 -13
- package/src/components/LangBtn/Accessibilite.stories.ts +0 -32
- package/src/components/Logo/Accessibilite.mdx +0 -13
- package/src/components/Logo/Accessibilite.stories.ts +0 -30
- package/src/components/LogoBrandSection/Accessibilite.mdx +0 -13
- package/src/components/LogoBrandSection/Accessibilite.stories.ts +0 -26
- package/src/components/LunarCalendar/tests/LunarCalendar.a11y.spec.ts +0 -31
- package/src/components/MaintenancePage/Accessibilite.mdx +0 -13
- package/src/components/MaintenancePage/Accessibilite.stories.ts +0 -36
- package/src/components/MaintenancePage/index.ts +0 -3
- package/src/components/NirField/Accessibilite.mdx +0 -13
- package/src/components/NirField/Accessibilite.stories.ts +0 -31
- package/src/components/NotFoundPage/Accessibilite.mdx +0 -13
- package/src/components/NotFoundPage/Accessibilite.stories.ts +0 -36
- package/src/components/NotificationBar/Accessibilite.mdx +0 -13
- package/src/components/NotificationBar/Accessibilite.stories.ts +0 -30
- package/src/components/PageContainer/Accessibilite.mdx +0 -13
- package/src/components/PageContainer/Accessibilite.stories.ts +0 -30
- package/src/components/PaginatedTable/Accessibilite.mdx +0 -13
- package/src/components/PaginatedTable/Accessibilite.stories.ts +0 -26
- package/src/components/PaginatedTable/tests/PaginatedTable.a11y.spec.ts +0 -43
- package/src/components/PasswordField/Accessibilite.mdx +0 -13
- package/src/components/PasswordField/Accessibilite.stories.ts +0 -121
- package/src/components/PeriodField/Accessibilite.mdx +0 -13
- package/src/components/PeriodField/Accessibilite.stories.ts +0 -27
- package/src/components/PhoneField/Accessibilite.mdx +0 -13
- package/src/components/PhoneField/Accessibilite.stories.ts +0 -32
- package/src/components/PhoneField/tests/PhoneField.a11y.spec.ts +0 -34
- package/src/components/RangeField/Accessibilite.mdx +0 -13
- package/src/components/RangeField/Accessibilite.stories.ts +0 -32
- package/src/components/RatingPicker/Accessibilite.mdx +0 -13
- package/src/components/RatingPicker/Accessibilite.stories.ts +0 -30
- package/src/components/SearchListField/Accessibilite.mdx +0 -13
- package/src/components/SearchListField/Accessibilite.stories.ts +0 -30
- package/src/components/SkipLink/Accessibilite.stories.ts +0 -36
- package/src/components/SocialMediaLinks/Accessibilite.mdx +0 -13
- package/src/components/SocialMediaLinks/Accessibilite.stories.ts +0 -36
- package/src/components/SubHeader/Accessibilite.mdx +0 -13
- package/src/components/SubHeader/Accessibilite.stories.ts +0 -36
- package/src/components/SyAlert/Accessibilite.mdx +0 -13
- package/src/components/SyAlert/Accessibilite.stories.ts +0 -30
- package/src/components/TableToolbar/Accessibilite.mdx +0 -13
- package/src/components/TableToolbar/Accessibilite.stories.ts +0 -26
- package/src/components/UploadWorkflow/Accessibilite.mdx +0 -13
- package/src/components/UploadWorkflow/Accessibilite.stories.ts +0 -26
- package/src/components/UserMenuBtn/Accessibilite.mdx +0 -13
- package/src/components/UserMenuBtn/Accessibilite.stories.ts +0 -25
- /package/src/components/HeaderBar/{Usages.stories.ts → usages/Usages.stories.ts} +0 -0
- /package/src/components/NotFoundPage/assets/{not-found.svg → not-found-cnam.svg} +0 -0
- /package/src/components/SyBtnMenu/accessibilite/{AccessibilityGuide.mdx → Accessibility.mdx} +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import SyCheckBoxGroup from '../SyCheckBoxGroup.vue'
|
|
2
|
+
import SyCheckbox from '@/components/Customs/SyCheckbox/SyCheckbox.vue'
|
|
3
|
+
import { mount } from '@vue/test-utils'
|
|
4
|
+
import { describe, it, expect } from 'vitest'
|
|
5
|
+
import { nextTick } from 'vue'
|
|
6
|
+
|
|
7
|
+
describe('SyCheckBoxGroup', () => {
|
|
8
|
+
it('should render correctly', () => {
|
|
9
|
+
const wrapper = mount(SyCheckBoxGroup, {
|
|
10
|
+
props: {
|
|
11
|
+
label: 'Test checkbox group',
|
|
12
|
+
options: [
|
|
13
|
+
{ label: 'A', value: 'A', id: 'opt-a' },
|
|
14
|
+
{ label: 'B', value: 'B', id: 'opt-b' },
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
expect(wrapper.find('.sy-checkbox-group').exists()).toBe(true)
|
|
20
|
+
expect(wrapper.text()).toContain('Test checkbox group')
|
|
21
|
+
expect(wrapper.findAll('input[type="checkbox"]').length).toBe(2)
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it('should handle v-model correctly (single)', async () => {
|
|
25
|
+
const wrapper = mount(SyCheckBoxGroup, {
|
|
26
|
+
props: {
|
|
27
|
+
'modelValue': null,
|
|
28
|
+
'onUpdate:modelValue': e => wrapper.setProps({ modelValue: e }),
|
|
29
|
+
'options': [
|
|
30
|
+
{ label: 'Option A', value: 'A', id: 'opt-a' },
|
|
31
|
+
{ label: 'Option B', value: 'B', id: 'opt-b' },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const checkboxes = wrapper.findAllComponents(SyCheckbox)
|
|
37
|
+
expect(checkboxes.length).toBe(2)
|
|
38
|
+
|
|
39
|
+
await checkboxes[0]?.find('input').setValue(true)
|
|
40
|
+
|
|
41
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['A'])
|
|
42
|
+
expect(wrapper.emitted('change')?.[0]).toEqual(['A'])
|
|
43
|
+
|
|
44
|
+
// Uncheck
|
|
45
|
+
await checkboxes[0]?.find('input').setValue(false)
|
|
46
|
+
expect(wrapper.emitted('update:modelValue')?.[1]).toEqual([null])
|
|
47
|
+
expect(wrapper.emitted('change')?.[1]).toEqual([null])
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
it('should handle v-model correctly (multiple)', async () => {
|
|
51
|
+
const wrapper = mount(SyCheckBoxGroup, {
|
|
52
|
+
props: {
|
|
53
|
+
'multiple': true,
|
|
54
|
+
'modelValue': [],
|
|
55
|
+
'onUpdate:modelValue': e => wrapper.setProps({ modelValue: e }),
|
|
56
|
+
'options': [
|
|
57
|
+
{ label: 'Option A', value: 'A', id: 'opt-a' },
|
|
58
|
+
{ label: 'Option B', value: 'B', id: 'opt-b' },
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const checkboxes = wrapper.findAllComponents(SyCheckbox)
|
|
64
|
+
expect(checkboxes.length).toBe(2)
|
|
65
|
+
|
|
66
|
+
await checkboxes[0]?.find('input').setValue(true)
|
|
67
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual([['A']])
|
|
68
|
+
|
|
69
|
+
await checkboxes[1]?.find('input').setValue(true)
|
|
70
|
+
expect(wrapper.emitted('update:modelValue')?.[1]).toEqual([['A', 'B']])
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
it('should handle validation correctly (required)', async () => {
|
|
74
|
+
const wrapper = mount(SyCheckBoxGroup, {
|
|
75
|
+
props: {
|
|
76
|
+
'modelValue': null,
|
|
77
|
+
'label': 'Required CheckBoxGroup',
|
|
78
|
+
'required': true,
|
|
79
|
+
'isValidateOnBlur': false,
|
|
80
|
+
'onUpdate:modelValue': e => wrapper.setProps({ modelValue: e }),
|
|
81
|
+
'options': [{ label: 'X', value: 'X', id: 'opt-x' }],
|
|
82
|
+
},
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
await wrapper.vm.validateOnSubmit()
|
|
86
|
+
await nextTick()
|
|
87
|
+
expect(wrapper.vm.validation.hasError.value).toBe(true)
|
|
88
|
+
expect(wrapper.vm.validation.errors.value[0]).toContain('est requis')
|
|
89
|
+
|
|
90
|
+
await wrapper.find('input').setValue(true)
|
|
91
|
+
|
|
92
|
+
await wrapper.vm.validateOnSubmit()
|
|
93
|
+
await nextTick()
|
|
94
|
+
|
|
95
|
+
expect(wrapper.vm.validation.hasError.value).toBe(false)
|
|
96
|
+
expect(wrapper.props('modelValue')).toBe('X')
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
it('should handle readonly and disabled states', async () => {
|
|
100
|
+
const wrapper = mount(SyCheckBoxGroup, {
|
|
101
|
+
props: {
|
|
102
|
+
modelValue: null,
|
|
103
|
+
readonly: true,
|
|
104
|
+
options: [{ label: 'X', value: 'X', id: 'opt-x' }],
|
|
105
|
+
},
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
wrapper.findComponent(SyCheckbox).vm.$emit('update:modelValue', true)
|
|
109
|
+
await nextTick()
|
|
110
|
+
expect(wrapper.emitted('update:modelValue')).toBeFalsy()
|
|
111
|
+
|
|
112
|
+
await wrapper.setProps({ readonly: false, disabled: true })
|
|
113
|
+
wrapper.findComponent(SyCheckbox).vm.$emit('update:modelValue', true)
|
|
114
|
+
await nextTick()
|
|
115
|
+
expect(wrapper.emitted('update:modelValue')).toBeFalsy()
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
it('should handle custom validation rules', async () => {
|
|
119
|
+
const customRule = {
|
|
120
|
+
type: 'custom',
|
|
121
|
+
options: {
|
|
122
|
+
validate: (value: unknown) => value === 'OK',
|
|
123
|
+
message: 'Vous devez sélectionner une option.',
|
|
124
|
+
fieldIdentifier: 'Custom CheckBoxGroup',
|
|
125
|
+
},
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const wrapper = mount(SyCheckBoxGroup, {
|
|
129
|
+
props: {
|
|
130
|
+
'modelValue': null,
|
|
131
|
+
'required': true,
|
|
132
|
+
'customRules': [customRule],
|
|
133
|
+
'isValidateOnBlur': false,
|
|
134
|
+
'options': [
|
|
135
|
+
{ label: 'Non', value: 'NO', id: 'opt-no' },
|
|
136
|
+
{ label: 'Oui', value: 'OK', id: 'opt-ok' },
|
|
137
|
+
],
|
|
138
|
+
'onUpdate:modelValue': e => wrapper.setProps({ modelValue: e }),
|
|
139
|
+
},
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
const isValidInitial = await wrapper.vm.validateOnSubmit()
|
|
143
|
+
expect(isValidInitial).toBe(false)
|
|
144
|
+
expect(wrapper.vm.validation.errors.value).toContain('Vous devez sélectionner une option.')
|
|
145
|
+
|
|
146
|
+
await wrapper.setProps({ modelValue: 'OK' })
|
|
147
|
+
|
|
148
|
+
const isValidCorrect = await wrapper.vm.validateOnSubmit()
|
|
149
|
+
expect(isValidCorrect).toBe(true)
|
|
150
|
+
expect(wrapper.vm.validation.errors.value).toHaveLength(0)
|
|
151
|
+
})
|
|
152
|
+
})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed, ref, watch, onMounted, nextTick } from 'vue'
|
|
2
|
+
import { computed, ref, watch, onMounted, onUpdated, nextTick } from 'vue'
|
|
3
|
+
import type { VCheckbox } from 'vuetify/components'
|
|
3
4
|
import { useValidation, type ValidationRule } from '@/composables/validation/useValidation'
|
|
4
5
|
import { useValidatable } from '@/composables/validation/useValidatable'
|
|
5
6
|
import { locales } from './locales'
|
|
@@ -70,6 +71,8 @@
|
|
|
70
71
|
|
|
71
72
|
const emit = defineEmits(['update:modelValue', 'update:indeterminate', 'change'])
|
|
72
73
|
|
|
74
|
+
const checkboxRef = ref<VCheckbox | null>(null)
|
|
75
|
+
|
|
73
76
|
const internalIndeterminate = ref(props.indeterminate)
|
|
74
77
|
|
|
75
78
|
const generatedLabel = computed(() => {
|
|
@@ -239,39 +242,24 @@
|
|
|
239
242
|
// Fonction pour supprimer les attributs ARIA non désirés des éléments input
|
|
240
243
|
const removeAriaAttributes = () => {
|
|
241
244
|
nextTick(() => {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// Configurer un MutationObserver pour surveiller les changements futurs
|
|
250
|
-
const observer = new MutationObserver((mutations) => {
|
|
251
|
-
mutations.forEach(() => {
|
|
252
|
-
// Pour aria-disabled
|
|
253
|
-
const newCheckboxInputsDisabled = document.querySelectorAll('input[type="checkbox"][aria-disabled="false"]')
|
|
254
|
-
newCheckboxInputsDisabled.forEach((input) => {
|
|
255
|
-
input.removeAttribute('aria-disabled')
|
|
256
|
-
})
|
|
257
|
-
})
|
|
258
|
-
})
|
|
259
|
-
|
|
260
|
-
// Observer le document pour les changements
|
|
261
|
-
observer.observe(document.body, {
|
|
262
|
-
subtree: true,
|
|
263
|
-
childList: true,
|
|
264
|
-
attributes: true,
|
|
265
|
-
attributeFilter: ['aria-disabled'],
|
|
266
|
-
})
|
|
245
|
+
if (checkboxRef.value) {
|
|
246
|
+
const checkboxInput = checkboxRef.value.$el.querySelector('input[type="checkbox"][aria-disabled="false"]')
|
|
247
|
+
if (checkboxInput) {
|
|
248
|
+
checkboxInput.removeAttribute('aria-disabled')
|
|
249
|
+
}
|
|
250
|
+
}
|
|
267
251
|
})
|
|
268
252
|
}
|
|
269
253
|
|
|
270
|
-
// Appliquer la correction lors du montage du composant
|
|
254
|
+
// Appliquer la correction lors du montage et de la mise à jour du composant
|
|
271
255
|
onMounted(() => {
|
|
272
256
|
removeAriaAttributes()
|
|
273
257
|
})
|
|
274
258
|
|
|
259
|
+
onUpdated(() => {
|
|
260
|
+
removeAriaAttributes()
|
|
261
|
+
})
|
|
262
|
+
|
|
275
263
|
// Intégration avec le système de validation du formulaire
|
|
276
264
|
useValidatable(validateOnSubmit)
|
|
277
265
|
|
|
@@ -317,6 +305,7 @@
|
|
|
317
305
|
<div>
|
|
318
306
|
<VCheckbox
|
|
319
307
|
:id="props.id"
|
|
308
|
+
ref="checkboxRef"
|
|
320
309
|
v-model="model"
|
|
321
310
|
:name="props.name"
|
|
322
311
|
:label="generatedLabel"
|
package/src/components/Customs/SyCheckbox/{Accessibilite.mdx → accessibilite/Accessibility.mdx}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories } from '@storybook/blocks';
|
|
2
|
-
import * as SyCheckboxStories from '
|
|
2
|
+
import * as SyCheckboxStories from '../SyCheckbox.stories';
|
|
3
3
|
import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
|
|
4
|
-
import '
|
|
4
|
+
import '@/stories/styles/shared.css';
|
|
5
5
|
|
|
6
|
-
<Meta of={SyCheckboxStories} />
|
|
6
|
+
<Meta of={SyCheckboxStories} name="Accessibility" />
|
|
7
7
|
|
|
8
8
|
<div className="accessibility-guide">
|
|
9
9
|
<div className="header">
|
|
@@ -4,7 +4,7 @@ import { describe, it } from 'vitest'
|
|
|
4
4
|
import { mount } from '@vue/test-utils'
|
|
5
5
|
import { axe } from 'vitest-axe'
|
|
6
6
|
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
|
-
import SyForm from '
|
|
7
|
+
import SyForm from './SyForm.vue'
|
|
8
8
|
|
|
9
9
|
// Scénario d’accessibilité : formulaire contenant un champ et un bouton de soumission.
|
|
10
10
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as SyForm from '../SyForm.stories';
|
|
3
|
+
import '@/stories/styles/shared.css';
|
|
4
|
+
|
|
5
|
+
<Meta of={SyForm}/>
|
|
6
|
+
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Accessibilité</h1>
|
|
9
|
+
<p>Cette page sera bientôt disponible</p>
|
|
10
|
+
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/blocks'
|
|
2
2
|
import * as SyIconStories from './SyIcon.stories'
|
|
3
|
+
import '@/stories/styles/shared.css';
|
|
3
4
|
|
|
4
5
|
<Meta of={SyIconStories} />
|
|
5
6
|
|
|
@@ -15,7 +16,9 @@ Le composant `SyIcon` est un wrapper autour du composant `v-icon` de Vuetify qui
|
|
|
15
16
|
<Primary />
|
|
16
17
|
<Controls />
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
<div className="header">
|
|
20
|
+
<h1>Accessibilité</h1>
|
|
21
|
+
</div>
|
|
19
22
|
|
|
20
23
|
Le composant `SyIcon` gère automatiquement les attributs ARIA en fonction de la nature de l'icône :
|
|
21
24
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import type { IconValue } from 'vuetify/lib/composables/icons.mjs'
|
|
3
|
+
import { vRgaaSvgFix } from '@/directives/rgaaSvgFix'
|
|
3
4
|
import { computed, onMounted, watch } from 'vue'
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -17,14 +18,14 @@
|
|
|
17
18
|
/**
|
|
18
19
|
* Vérifie si une icône non décorative a un label
|
|
19
20
|
*/
|
|
20
|
-
const checkAccessibility = (icon:
|
|
21
|
+
const checkAccessibility = (icon: IconValue, decorative: boolean | undefined, label: string | undefined) => {
|
|
21
22
|
if (decorative === false && !label) {
|
|
22
23
|
console.error(`L'icône "${icon}" n'est pas décorative, mais aucun texte alternatif (label) n'a été fourni.`)
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
const props = defineProps<{
|
|
27
|
-
icon:
|
|
28
|
+
icon: IconValue
|
|
28
29
|
label?: string
|
|
29
30
|
decorative?: boolean
|
|
30
31
|
role?: 'img' | 'button' | 'presentation'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import SyIconAccessibility from '
|
|
1
|
+
import SyIconAccessibility from '../SyIconAccessibility.vue'
|
|
2
2
|
import { mdiStar } from '@mdi/js'
|
|
3
3
|
|
|
4
4
|
const meta = {
|
|
5
|
-
title: 'Composants/Données/SyIcon/
|
|
6
|
-
component: () => import('
|
|
5
|
+
title: 'Composants/Données/SyIcon/Accessibility',
|
|
6
|
+
component: () => import('../SyIcon.vue'),
|
|
7
7
|
parameters: {
|
|
8
8
|
docs: {
|
|
9
9
|
description: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Canvas } from '@storybook/blocks'
|
|
2
2
|
import * as SyIconStoriesAccessibility from './Accessibilite.stories'
|
|
3
|
-
import SyIconAccessibility from '
|
|
3
|
+
import SyIconAccessibility from '../SyIconAccessibility.vue'
|
|
4
4
|
|
|
5
5
|
<Meta of={SyIconStoriesAccessibility} />
|
|
6
|
-
import '
|
|
6
|
+
import '@/stories/styles/shared.css';
|
|
7
7
|
|
|
8
8
|
<div className="header">
|
|
9
9
|
<h1>Accessibilité du composant SyIcon</h1>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Canvas, Meta, Controls, Story, Source } from '@storybook/blocks';
|
|
2
|
-
import '
|
|
2
|
+
import '@/stories/styles/shared.css';
|
|
3
3
|
import * as SyPaginationStories from "./SyPagination.stories";
|
|
4
4
|
|
|
5
5
|
<Meta of={SyPaginationStories} />
|
|
@@ -142,7 +142,9 @@ Voici un exemple d'implémentation du composant SyPagination :
|
|
|
142
142
|
</style>
|
|
143
143
|
`} />
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
<div className="header">
|
|
146
|
+
<h1>Accessibilité</h1>
|
|
147
|
+
</div>
|
|
146
148
|
|
|
147
149
|
Le composant SyPagination respecte les règles d'accessibilité RGAA :
|
|
148
150
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as SyPagination from '../SyPagination.stories';
|
|
3
|
+
import '@/stories/styles/shared.css';
|
|
4
|
+
|
|
5
|
+
<Meta of={SyPagination} />
|
|
6
|
+
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Accessibilité</h1>
|
|
9
|
+
<p>Cette page sera bientôt disponible</p>
|
|
10
|
+
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
|
|
3
|
-
import { computed, nextTick, onMounted, ref, watch } from 'vue'
|
|
3
|
+
import { computed, nextTick, onMounted, onUpdated, ref, watch } from 'vue'
|
|
4
|
+
import type { VRadioGroup } from 'vuetify/components'
|
|
4
5
|
import { useValidation, type ValidationRule } from '@/composables/validation/useValidation'
|
|
5
6
|
import { useValidatable } from '@/composables/validation/useValidatable'
|
|
6
7
|
import { locales } from './locales'
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
)
|
|
62
63
|
|
|
63
64
|
const emit = defineEmits(['update:modelValue', 'change'])
|
|
65
|
+
const radioGroupRef = ref<VRadioGroup | null>(null)
|
|
64
66
|
const model = computed({
|
|
65
67
|
get() {
|
|
66
68
|
return props.modelValue
|
|
@@ -139,24 +141,10 @@
|
|
|
139
141
|
|
|
140
142
|
watch(model, (newValue) => {
|
|
141
143
|
if (!props.isValidateOnBlur) {
|
|
142
|
-
|
|
143
|
-
if (isSubmitted.value) {
|
|
144
|
-
const isValid = validateField(newValue)
|
|
145
|
-
if (isValid) {
|
|
146
|
-
// La validation a réussi, effacer les erreurs
|
|
147
|
-
validation.clearValidation()
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
// Comportement normal (hors soumission)
|
|
152
|
-
const isValid = validateField(newValue)
|
|
153
|
-
// Si la validation réussit, s'assurer que les erreurs sont effacées
|
|
154
|
-
if (isValid && validation.hasError.value) {
|
|
155
|
-
validation.clearValidation()
|
|
156
|
-
}
|
|
157
|
-
}
|
|
144
|
+
validateField(newValue)
|
|
158
145
|
}
|
|
159
146
|
})
|
|
147
|
+
|
|
160
148
|
const hasError = computed(() => validation.hasError.value)
|
|
161
149
|
const hasWarning = computed(() => validation.hasWarning.value)
|
|
162
150
|
const hasSuccess = computed(() => validation.hasSuccess.value)
|
|
@@ -184,36 +172,16 @@
|
|
|
184
172
|
|
|
185
173
|
const removeAriaAttributesForRadio = () => {
|
|
186
174
|
nextTick(() => {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
radioInputsDisabled.forEach((input) => {
|
|
192
|
-
input.removeAttribute('aria-disabled')
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
// Observer les futurs changements
|
|
196
|
-
const observer = new MutationObserver((mutations) => {
|
|
197
|
-
mutations.forEach(() => {
|
|
198
|
-
const newRadioInputsDisabled = document.querySelectorAll(
|
|
199
|
-
'input[type="radio"][aria-disabled="false"]',
|
|
200
|
-
)
|
|
201
|
-
newRadioInputsDisabled.forEach((input) => {
|
|
202
|
-
input.removeAttribute('aria-disabled')
|
|
203
|
-
})
|
|
175
|
+
if (radioGroupRef.value) {
|
|
176
|
+
const radioInputs = radioGroupRef.value.$el.querySelectorAll('input[type="radio"][aria-disabled="false"]')
|
|
177
|
+
radioInputs.forEach((input: Element) => {
|
|
178
|
+
input.removeAttribute('aria-disabled')
|
|
204
179
|
})
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
observer.observe(document.body, {
|
|
208
|
-
subtree: true,
|
|
209
|
-
childList: true,
|
|
210
|
-
attributes: true,
|
|
211
|
-
attributeFilter: ['aria-disabled'],
|
|
212
|
-
})
|
|
180
|
+
}
|
|
213
181
|
})
|
|
214
182
|
}
|
|
215
183
|
|
|
216
|
-
// Appliquer la correction lors du montage du composant
|
|
184
|
+
// Appliquer la correction lors du montage et de la mise à jour du composant
|
|
217
185
|
onMounted(() => {
|
|
218
186
|
removeAriaAttributesForRadio()
|
|
219
187
|
if (!props.isValidateOnBlur && !props.required) {
|
|
@@ -221,6 +189,10 @@
|
|
|
221
189
|
}
|
|
222
190
|
})
|
|
223
191
|
|
|
192
|
+
onUpdated(() => {
|
|
193
|
+
removeAriaAttributesForRadio()
|
|
194
|
+
})
|
|
195
|
+
|
|
224
196
|
// Intégration avec le système de validation du formulaire
|
|
225
197
|
useValidatable(validateOnSubmit)
|
|
226
198
|
|
|
@@ -235,6 +207,7 @@
|
|
|
235
207
|
<template>
|
|
236
208
|
<v-radio-group
|
|
237
209
|
:id="props.id"
|
|
210
|
+
ref="radioGroupRef"
|
|
238
211
|
v-model="model"
|
|
239
212
|
:class="{
|
|
240
213
|
'warning-field': hasWarning && !hasError,
|
package/src/components/Customs/SyRadioGroup/{Accessibilite.mdx → accessibilite/Accessibility.mdx}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories } from '@storybook/blocks';
|
|
2
|
-
import * as SyRadioGroupStories from '
|
|
2
|
+
import * as SyRadioGroupStories from '../SyRadioGroup.stories';
|
|
3
3
|
import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
|
|
4
|
-
import '
|
|
4
|
+
import '@/stories/styles/shared.css';
|
|
5
5
|
|
|
6
6
|
<Meta of={SyRadioGroupStories} />
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, Canvas, Controls, Source, Story } from '@storybook/blocks';
|
|
2
|
-
import '
|
|
2
|
+
import '@/stories/styles/shared.css';
|
|
3
3
|
import * as SyTabsStories from "./SyTabs.stories";
|
|
4
4
|
|
|
5
5
|
<Meta of={SyTabsStories} />
|
|
@@ -36,7 +36,9 @@ export interface TabItem {
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
<div className="header">
|
|
40
|
+
<h1>Accessibilité</h1>
|
|
41
|
+
</div>
|
|
40
42
|
|
|
41
43
|
Le composant `SyTabs` respecte les critères d'accessibilité RGAA suivants :
|
|
42
44
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories } from '@storybook/blocks';
|
|
2
|
-
import * as SyTabsStories from '
|
|
2
|
+
import * as SyTabsStories from '../SyTabs.stories';
|
|
3
3
|
import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
|
|
4
|
-
import '
|
|
4
|
+
import '@/stories/styles/shared.css';
|
|
5
5
|
|
|
6
6
|
<Meta of={SyTabsStories} />
|
|
7
7
|
|
|
@@ -43,7 +43,6 @@ Le champ adapte automatiquement son apparence selon son état :
|
|
|
43
43
|
import { SyTextField } from '@cnamts/synapse'
|
|
44
44
|
|
|
45
45
|
const model = ref('')
|
|
46
|
-
import '../../../stories/styles/shared.css';
|
|
47
46
|
|
|
48
47
|
</script>
|
|
49
48
|
|
|
@@ -51,7 +50,7 @@ import '../../../stories/styles/shared.css';
|
|
|
51
50
|
<main class="ma-12">
|
|
52
51
|
Text saisie: {{ model }}
|
|
53
52
|
<div class="d-flex flex-wrap align-center">
|
|
54
|
-
|
|
53
|
+
<SyTextField
|
|
55
54
|
v-model="model"
|
|
56
55
|
label="Label"
|
|
57
56
|
color="primary"
|
|
@@ -550,6 +550,10 @@
|
|
|
550
550
|
|
|
551
551
|
if (describedbyIds) {
|
|
552
552
|
inputElement.setAttribute('aria-describedby', describedbyIds)
|
|
553
|
+
// si erreur ajouter erreur dans aria-describedby
|
|
554
|
+
if (hasError.value) {
|
|
555
|
+
inputElement.setAttribute('aria-describedby', `${describedbyIds} ${messagesId}`)
|
|
556
|
+
}
|
|
553
557
|
}
|
|
554
558
|
else {
|
|
555
559
|
inputElement.removeAttribute('aria-describedby')
|
|
@@ -791,6 +795,10 @@
|
|
|
791
795
|
opacity: 1 !important;
|
|
792
796
|
}
|
|
793
797
|
|
|
798
|
+
:deep(.v-icon__svg) {
|
|
799
|
+
fill: tokens.$colors-text-warning !important;
|
|
800
|
+
}
|
|
801
|
+
|
|
794
802
|
:deep(.v-field) {
|
|
795
803
|
color: tokens.$colors-border-warning !important;
|
|
796
804
|
|
|
@@ -867,6 +875,11 @@
|
|
|
867
875
|
fill: rgb(0 0 0 / 70%);
|
|
868
876
|
}
|
|
869
877
|
|
|
878
|
+
:deep(.v-field--focused .v-field__outline) {
|
|
879
|
+
color: tokens.$primary-base !important;
|
|
880
|
+
opacity: 1 !important;
|
|
881
|
+
}
|
|
882
|
+
|
|
870
883
|
:deep(.v-input__prepend .v-icon:focus-visible),
|
|
871
884
|
:deep(.v-input__append .v-icon:focus-visible) {
|
|
872
885
|
outline: 2px solid tokens.$primary-base;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as Stories from '../SyTextField.stories.ts';
|
|
3
|
+
import '@/stories/styles/shared.css';
|
|
4
|
+
|
|
5
|
+
<Meta of={Stories} />
|
|
6
|
+
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Accessibilité</h1>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<div class="mt-2">
|
|
13
|
+
<p>Rapport d’audit manuel : <a href="/audits/SyTextField.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
|
|
14
|
+
<p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/935" target="_blank" style={{color:'#0C41BD'}}>issue #935</a>), (<a href="https://github.com/assurance-maladie-digital/design-system/issues/4028" target="_blank" style={{color:'#0C41BD'}}>issue #4028</a>)</p>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as Stories from '../DataList.stories.ts';
|
|
3
|
+
import '@/stories/styles/shared.css';
|
|
4
|
+
|
|
5
|
+
<Meta of={Stories} />
|
|
6
|
+
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Accessibilité</h1>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<div class="mt-2">
|
|
13
|
+
<p>Rapport d’audit manuel : <a href="/audits/DataList.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
|
|
14
|
+
<p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/4030" target="_blank" style={{color:'#0C41BD'}}>issue #4030</a>)</p>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/addon-docs';
|
|
2
|
+
import * as Stories from '../DataListGroup.stories.ts';
|
|
3
|
+
import '@/stories/styles/shared.css';
|
|
4
|
+
|
|
5
|
+
<Meta of={Stories} />
|
|
6
|
+
|
|
7
|
+
<div className="header">
|
|
8
|
+
<h1>Accessibilité</h1>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="mt-2">
|
|
12
|
+
<p>Rapport d’audit manuel : <a href="/audits/DataListGroup.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
|
|
13
|
+
<p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/651" target="_blank" style={{color:'#0C41BD'}}>issue #651</a>)</p>
|
|
14
|
+
</div>
|
|
@@ -4,7 +4,7 @@ import { mdiCheckboxMarkedCircle } from '@mdi/js'
|
|
|
4
4
|
const checkIcon = mdiCheckboxMarkedCircle
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'Composants/Formulaires/DatePicker/
|
|
7
|
+
title: 'Composants/Formulaires/DatePicker/Accessibility',
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export const Legende: StoryObj = {
|