@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
|
@@ -1,6 +1,26 @@
|
|
|
1
|
+
import imgUrlAp from './assets/not-found-ap.svg'
|
|
2
|
+
import imgUrlCnam from './assets/not-found-cnam.svg'
|
|
3
|
+
|
|
4
|
+
export const SUPPORT_ID_PARAM_NAME = 'support_id'
|
|
5
|
+
export const supportIdMessage = 'Votre identifiant de support est'
|
|
6
|
+
|
|
1
7
|
export const locales = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
default: {
|
|
9
|
+
code: '404',
|
|
10
|
+
pageTitle: 'Page non trouvée',
|
|
11
|
+
message: 'Cette page n’existe pas ou a été déplacée.',
|
|
12
|
+
src: imgUrlCnam,
|
|
13
|
+
},
|
|
14
|
+
cnam: {
|
|
15
|
+
code: '404',
|
|
16
|
+
pageTitle: 'Page non trouvée',
|
|
17
|
+
message: 'Cette page n’existe pas ou a été déplacée.',
|
|
18
|
+
src: imgUrlCnam,
|
|
19
|
+
},
|
|
20
|
+
ap: {
|
|
21
|
+
code: '404',
|
|
22
|
+
pageTitle: 'Page non trouvée ou inexistante - Erreur 404',
|
|
23
|
+
message: 'La page que vous essayez d’afficher n’existe plus ou a été déplacée.',
|
|
24
|
+
src: imgUrlAp,
|
|
25
|
+
},
|
|
6
26
|
}
|
|
@@ -1,31 +1,195 @@
|
|
|
1
1
|
// @vitest-environment jsdom
|
|
2
2
|
|
|
3
3
|
import { describe, it } from 'vitest'
|
|
4
|
-
import { mount } from '@vue/test-utils'
|
|
4
|
+
import { mount, flushPromises } from '@vue/test-utils'
|
|
5
5
|
import { axe } from 'vitest-axe'
|
|
6
6
|
import { assertNoA11yViolations } from '@tests/unit/accessibility/axeUtils'
|
|
7
7
|
import NotFoundPage from '../NotFoundPage.vue'
|
|
8
8
|
import { locales } from '../locales'
|
|
9
9
|
|
|
10
|
-
// Scénario d
|
|
10
|
+
// Scénario d'accessibilité : page 404 avec code, message et identifiant de support.
|
|
11
11
|
|
|
12
12
|
describe('NotFoundPage – accessibility (axe)', () => {
|
|
13
|
+
it('has no obvious axe violations in default state', async () => {
|
|
14
|
+
const wrapper = mount(NotFoundPage)
|
|
15
|
+
await flushPromises()
|
|
16
|
+
await wrapper.vm.$nextTick()
|
|
17
|
+
|
|
18
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
19
|
+
assertNoA11yViolations(results, 'NotFoundPage – default state', {
|
|
20
|
+
ignoreRules: ['region'],
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
|
|
13
24
|
it('has no obvious axe violations with support ID in URL', async () => {
|
|
14
25
|
// Simuler une URL contenant un identifiant de support
|
|
15
26
|
history.replaceState({}, '', `/not-found?support_id=1234567890123456789`)
|
|
16
27
|
|
|
17
28
|
const wrapper = mount(NotFoundPage)
|
|
29
|
+
await flushPromises()
|
|
18
30
|
await wrapper.vm.$nextTick()
|
|
19
31
|
|
|
20
|
-
// S
|
|
32
|
+
// S'assurer que le contenu principal est bien rendu
|
|
21
33
|
const text = wrapper.text()
|
|
22
|
-
if (!text.includes(locales.code) || !text.includes(locales.message)) {
|
|
34
|
+
if (!text.includes(locales.default.code) || !text.includes(locales.default.message)) {
|
|
23
35
|
throw new Error('NotFoundPage main content not rendered as expected')
|
|
24
36
|
}
|
|
25
37
|
|
|
38
|
+
// Vérifier que le support ID est affiché avec un formatage espacé
|
|
39
|
+
if (!text.includes('1234 5678 9012 3456 789')) {
|
|
40
|
+
throw new Error('Support ID not formatted correctly')
|
|
41
|
+
}
|
|
42
|
+
|
|
26
43
|
const results = await axe(wrapper.element as HTMLElement)
|
|
27
44
|
assertNoA11yViolations(results, 'NotFoundPage – with support ID', {
|
|
28
45
|
ignoreRules: ['region'],
|
|
29
46
|
})
|
|
30
47
|
})
|
|
48
|
+
|
|
49
|
+
it('has no obvious axe violations with custom button text and href', async () => {
|
|
50
|
+
const wrapper = mount(NotFoundPage, {
|
|
51
|
+
props: {
|
|
52
|
+
btnText: 'Retour à l\'accueil',
|
|
53
|
+
btnHref: 'https://example.com',
|
|
54
|
+
},
|
|
55
|
+
})
|
|
56
|
+
await flushPromises()
|
|
57
|
+
await wrapper.vm.$nextTick()
|
|
58
|
+
|
|
59
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
60
|
+
assertNoA11yViolations(results, 'NotFoundPage – with custom button props', {
|
|
61
|
+
ignoreRules: ['region'],
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
it('has no obvious axe violations when button is hidden', async () => {
|
|
66
|
+
const wrapper = mount(NotFoundPage, {
|
|
67
|
+
props: {
|
|
68
|
+
hideBtn: true,
|
|
69
|
+
},
|
|
70
|
+
})
|
|
71
|
+
await flushPromises()
|
|
72
|
+
await wrapper.vm.$nextTick()
|
|
73
|
+
|
|
74
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
75
|
+
assertNoA11yViolations(results, 'NotFoundPage – button hidden', {
|
|
76
|
+
ignoreRules: ['region'],
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
it('has no obvious axe violations with router link navigation', async () => {
|
|
81
|
+
const wrapper = mount(NotFoundPage, {
|
|
82
|
+
props: {
|
|
83
|
+
btnText: 'Retour',
|
|
84
|
+
btnLink: '/home',
|
|
85
|
+
},
|
|
86
|
+
global: {
|
|
87
|
+
stubs: {
|
|
88
|
+
RouterLink: true,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
})
|
|
92
|
+
await flushPromises()
|
|
93
|
+
await wrapper.vm.$nextTick()
|
|
94
|
+
|
|
95
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
96
|
+
assertNoA11yViolations(results, 'NotFoundPage – with router link', {
|
|
97
|
+
ignoreRules: ['region'],
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
it('has proper semantic structure for 404 error page', async () => {
|
|
102
|
+
const wrapper = mount(NotFoundPage)
|
|
103
|
+
await flushPromises()
|
|
104
|
+
await wrapper.vm.$nextTick()
|
|
105
|
+
|
|
106
|
+
const text = wrapper.text()
|
|
107
|
+
// Vérifier que le code 404 est présent
|
|
108
|
+
if (!text.includes('404')) {
|
|
109
|
+
throw new Error('404 code not found in page content')
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Vérifier que le message est présent
|
|
113
|
+
if (!text.includes('Page non trouvée')) {
|
|
114
|
+
throw new Error('Page title not found in page content')
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
118
|
+
assertNoA11yViolations(results, 'NotFoundPage – semantic structure', {
|
|
119
|
+
ignoreRules: ['region'],
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
it('has no obvious axe violations with illustration slot', async () => {
|
|
124
|
+
const wrapper = mount(NotFoundPage, {
|
|
125
|
+
slots: {
|
|
126
|
+
illustration: '<img src="/custom-404.svg" alt="" aria-hidden="true" />',
|
|
127
|
+
},
|
|
128
|
+
})
|
|
129
|
+
await flushPromises()
|
|
130
|
+
await wrapper.vm.$nextTick()
|
|
131
|
+
|
|
132
|
+
const img = wrapper.find('img')
|
|
133
|
+
if (img.exists() && img.attributes('alt') !== '') {
|
|
134
|
+
throw new Error('Illustration image should have empty alt for decorative purpose')
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
138
|
+
assertNoA11yViolations(results, 'NotFoundPage – custom illustration', {
|
|
139
|
+
ignoreRules: ['region'],
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
it('has correct ARIA attributes on illustration image', async () => {
|
|
144
|
+
const wrapper = mount(NotFoundPage)
|
|
145
|
+
await flushPromises()
|
|
146
|
+
await wrapper.vm.$nextTick()
|
|
147
|
+
|
|
148
|
+
const img = wrapper.find('img')
|
|
149
|
+
if (img.exists()) {
|
|
150
|
+
// L'image illustrative doit être marquée comme décoration
|
|
151
|
+
if (img.attributes('aria-hidden') !== 'true') {
|
|
152
|
+
throw new Error('Illustration should have aria-hidden="true"')
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// L'alt doit être vide pour les images décoratives
|
|
156
|
+
if (img.attributes('alt') !== '') {
|
|
157
|
+
throw new Error('Decorative image should have empty alt text')
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
162
|
+
assertNoA11yViolations(results, 'NotFoundPage – ARIA attributes on image', {
|
|
163
|
+
ignoreRules: ['region'],
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
it('has no obvious axe violations with support ID containing spaces already', async () => {
|
|
168
|
+
// Tester avec un ID qui contient déjà des espacements
|
|
169
|
+
history.replaceState({}, '', `/not-found?support_id= ABCD EFGH IJKL `)
|
|
170
|
+
|
|
171
|
+
const wrapper = mount(NotFoundPage)
|
|
172
|
+
await flushPromises()
|
|
173
|
+
await wrapper.vm.$nextTick()
|
|
174
|
+
|
|
175
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
176
|
+
assertNoA11yViolations(results, 'NotFoundPage – support ID with spaces', {
|
|
177
|
+
ignoreRules: ['region'],
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
|
|
181
|
+
it('has no obvious axe violations with long support ID', async () => {
|
|
182
|
+
// Tester avec un ID très long
|
|
183
|
+
const longId = '12345678901234567890123456789012'
|
|
184
|
+
history.replaceState({}, '', `/not-found?support_id=${longId}`)
|
|
185
|
+
|
|
186
|
+
const wrapper = mount(NotFoundPage)
|
|
187
|
+
await flushPromises()
|
|
188
|
+
await wrapper.vm.$nextTick()
|
|
189
|
+
|
|
190
|
+
const results = await axe(wrapper.element as HTMLElement)
|
|
191
|
+
assertNoA11yViolations(results, 'NotFoundPage – long support ID', {
|
|
192
|
+
ignoreRules: ['region'],
|
|
193
|
+
})
|
|
194
|
+
})
|
|
31
195
|
})
|
|
@@ -1,28 +1,116 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest'
|
|
2
|
-
import { mount } from '@vue/test-utils'
|
|
3
|
-
import { locales } from '../locales'
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
|
2
|
+
import { mount, flushPromises } from '@vue/test-utils'
|
|
4
3
|
import NotFoundPage from '../NotFoundPage.vue'
|
|
4
|
+
import StatusPage from '../../StatusPage/StatusPage.vue'
|
|
5
|
+
|
|
6
|
+
vi.mock('@/utils/theme', () => ({
|
|
7
|
+
useThemeLocales: () => ({
|
|
8
|
+
themeLocales: {
|
|
9
|
+
code: '404',
|
|
10
|
+
pageTitle: 'Page non trouvée',
|
|
11
|
+
message: 'Cette page n\'existe pas ou a été déplacée.',
|
|
12
|
+
src: '/src/components/NotFoundPage/assets/not-found.svg',
|
|
13
|
+
},
|
|
14
|
+
}),
|
|
15
|
+
}))
|
|
5
16
|
|
|
6
17
|
describe('NotFoundPage', () => {
|
|
7
|
-
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
history.replaceState({}, '', '/')
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it('renders correctly', async () => {
|
|
8
23
|
const wrapper = mount(NotFoundPage)
|
|
24
|
+
await flushPromises()
|
|
25
|
+
await wrapper.vm.$nextTick()
|
|
9
26
|
|
|
10
|
-
expect(wrapper.
|
|
11
|
-
expect(wrapper.text()).toContain(
|
|
27
|
+
expect(wrapper.findComponent(StatusPage).exists()).toBe(true)
|
|
28
|
+
expect(wrapper.text()).toContain('404')
|
|
29
|
+
expect(wrapper.text()).toContain('Page non trouvée')
|
|
12
30
|
expect(wrapper.html()).toMatchSnapshot()
|
|
13
31
|
})
|
|
14
32
|
|
|
15
33
|
it('display the support ID if provided in the url', async () => {
|
|
16
|
-
history.replaceState(
|
|
17
|
-
{},
|
|
18
|
-
'',
|
|
19
|
-
'/not-found?support_id=1234567890123456789',
|
|
20
|
-
)
|
|
21
|
-
const wrapper = mount(NotFoundPage)
|
|
34
|
+
history.replaceState({}, '', '/not-found?support_id=1234567890123456789')
|
|
22
35
|
|
|
36
|
+
const wrapper = mount(NotFoundPage)
|
|
37
|
+
await flushPromises()
|
|
23
38
|
await wrapper.vm.$nextTick()
|
|
24
39
|
|
|
40
|
+
expect(wrapper.text()).toContain('Votre identifiant de support est')
|
|
25
41
|
expect(wrapper.text()).toContain('1234 5678 9012 3456 789')
|
|
26
42
|
expect(wrapper.html()).toMatchSnapshot()
|
|
27
43
|
})
|
|
44
|
+
|
|
45
|
+
it('does not display support ID section when no support_id in url', async () => {
|
|
46
|
+
const wrapper = mount(NotFoundPage)
|
|
47
|
+
await flushPromises()
|
|
48
|
+
await wrapper.vm.$nextTick()
|
|
49
|
+
|
|
50
|
+
expect(wrapper.text()).not.toContain('Votre identifiant de support est')
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
it('renders StatusPage with correct props', async () => {
|
|
54
|
+
const wrapper = mount(NotFoundPage)
|
|
55
|
+
await flushPromises()
|
|
56
|
+
await wrapper.vm.$nextTick()
|
|
57
|
+
|
|
58
|
+
const statusPage = wrapper.findComponent(StatusPage)
|
|
59
|
+
expect(statusPage.props('code')).toBe('404')
|
|
60
|
+
expect(statusPage.props('pageTitle')).toBe('Page non trouvée')
|
|
61
|
+
expect(statusPage.props('message')).toBe('Cette page n\'existe pas ou a été déplacée.')
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
it('renders with custom button props', async () => {
|
|
65
|
+
const wrapper = mount(NotFoundPage, {
|
|
66
|
+
props: {
|
|
67
|
+
btnText: 'Retour à l\'accueil',
|
|
68
|
+
btnHref: '/',
|
|
69
|
+
},
|
|
70
|
+
})
|
|
71
|
+
await flushPromises()
|
|
72
|
+
await wrapper.vm.$nextTick()
|
|
73
|
+
|
|
74
|
+
const statusPage = wrapper.findComponent(StatusPage)
|
|
75
|
+
expect(statusPage.props('btnText')).toBe('Retour à l\'accueil')
|
|
76
|
+
expect(statusPage.props('btnHref')).toBe('/')
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it('hides button when hideBtn prop is true', async () => {
|
|
80
|
+
const wrapper = mount(NotFoundPage, {
|
|
81
|
+
props: {
|
|
82
|
+
hideBtn: true,
|
|
83
|
+
},
|
|
84
|
+
})
|
|
85
|
+
await flushPromises()
|
|
86
|
+
await wrapper.vm.$nextTick()
|
|
87
|
+
|
|
88
|
+
expect(wrapper.findComponent(StatusPage).props('hideBtn')).toBe(true)
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
it('renders illustration with correct accessibility attributes', async () => {
|
|
92
|
+
const wrapper = mount(NotFoundPage)
|
|
93
|
+
await flushPromises()
|
|
94
|
+
await wrapper.vm.$nextTick()
|
|
95
|
+
|
|
96
|
+
const img = wrapper.find('img')
|
|
97
|
+
expect(img.exists()).toBe(true)
|
|
98
|
+
expect(img.attributes('src')).toBe('/src/components/NotFoundPage/assets/not-found.svg')
|
|
99
|
+
expect(img.attributes('alt')).toBe('')
|
|
100
|
+
expect(img.attributes('aria-hidden')).toBe('true')
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
it('renders custom illustration slot', async () => {
|
|
104
|
+
const wrapper = mount(NotFoundPage, {
|
|
105
|
+
slots: {
|
|
106
|
+
illustration: '<img src="/custom.svg" alt="" aria-hidden="true" />',
|
|
107
|
+
},
|
|
108
|
+
})
|
|
109
|
+
await flushPromises()
|
|
110
|
+
await wrapper.vm.$nextTick()
|
|
111
|
+
|
|
112
|
+
const img = wrapper.find('img')
|
|
113
|
+
expect(img.exists()).toBe(true)
|
|
114
|
+
expect(img.attributes('src')).toBe('/custom.svg')
|
|
115
|
+
})
|
|
28
116
|
})
|
|
@@ -113,7 +113,7 @@ exports[`NotFoundPage > display the support ID if provided in the url 1`] = `
|
|
|
113
113
|
</h1>
|
|
114
114
|
<p>
|
|
115
115
|
<span>
|
|
116
|
-
Cette page n
|
|
116
|
+
Cette page n'existe pas ou a été déplacée.
|
|
117
117
|
</span>
|
|
118
118
|
</p>
|
|
119
119
|
<p class="mt-4">
|
|
@@ -260,7 +260,7 @@ exports[`NotFoundPage > renders correctly 1`] = `
|
|
|
260
260
|
</h1>
|
|
261
261
|
<p>
|
|
262
262
|
<span>
|
|
263
|
-
Cette page n
|
|
263
|
+
Cette page n'existe pas ou a été déplacée.
|
|
264
264
|
</span>
|
|
265
265
|
</p>
|
|
266
266
|
<!-- v-if -->
|
|
@@ -5,8 +5,8 @@ import * as NotificationBarStories from './NotificationBar.stories';
|
|
|
5
5
|
<Meta of={NotificationBarStories} />
|
|
6
6
|
|
|
7
7
|
<div className="header">
|
|
8
|
-
<h1>Accessibilité du composant
|
|
9
|
-
<p>Le composant `
|
|
8
|
+
<h1>Accessibilité du composant NotificationBar </h1>
|
|
9
|
+
<p>Le composant `NotificationBar` est un wrapper autour du composant `v-icon` de Vuetify qui ajoute une gestion automatique de l'accessibilité selon les normes RGAA.</p>
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
12
|
##### Les NotificationsBar servent à notifier l’utilisateur soit d’un retour d’action.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Meta, Primary } from '@storybook/blocks';
|
|
2
|
+
import * as NotificationBarStories from '../NotificationBar.stories.ts';
|
|
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';
|
|
12
|
+
|
|
13
|
+
<Meta of={NotificationBarStories} />
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
<AccessibilityGuideLayout
|
|
17
|
+
componentName="NotificationBar"
|
|
18
|
+
iconSrc={AccessibilityIcon}
|
|
19
|
+
>
|
|
20
|
+
<div class="mt-8">
|
|
21
|
+
<p>Rapport d’audit manuel : <a href="/audits/NotificationBar.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
|
|
22
|
+
<p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/4029" target="_blank" style={{color:'#0C41BD'}}>issue #4029</a>)</p>
|
|
23
|
+
</div>
|
|
24
|
+
<CriteriaSection>
|
|
25
|
+
<CriteriaCard icon="🔔" title="Annonce et rôles adaptés">
|
|
26
|
+
<ul>
|
|
27
|
+
<li><strong>Rôle dynamique</strong> : <code>role="status"</code> pour les notifications neutres et <code>role="alert"</code> pour les erreurs afin d’informer immédiatement les lecteurs d’écran.</li>
|
|
28
|
+
<li><strong>Icônes décoratives</strong> : les pictogrammes sont marqués comme décoratifs pour ne pas être annoncés inutilement.</li>
|
|
29
|
+
</ul>
|
|
30
|
+
</CriteriaCard>
|
|
31
|
+
|
|
32
|
+
<CriteriaCard icon="⌨️" title="Navigation clavier complète">
|
|
33
|
+
<ul>
|
|
34
|
+
<li><strong>Fermeture clavier</strong> : le bouton « Fermer » est focalisable, activable au clavier et accessible avec <kbd>Échap</kbd>.</li>
|
|
35
|
+
<li><strong>Focus visible</strong> : styles d’outline renforcés sur le bouton de fermeture pour chaque état de contraste.</li>
|
|
36
|
+
</ul>
|
|
37
|
+
</CriteriaCard>
|
|
38
|
+
|
|
39
|
+
<CriteriaCard icon="🕒" title="Temps de lecture maîtrisé">
|
|
40
|
+
<ul>
|
|
41
|
+
<li><strong>Pas d’expiration forcée</strong> : par défaut <code>timeout=-1</code> pour laisser le temps de lecture ; la temporisation reste configurable.</li>
|
|
42
|
+
<li><strong>File ou liste</strong> : <code>show-all</code> permet d’afficher toutes les notifications simultanément pour éviter la perte d’information.</li>
|
|
43
|
+
</ul>
|
|
44
|
+
</CriteriaCard>
|
|
45
|
+
|
|
46
|
+
<CriteriaCard icon="🖼️" title="Lisibilité et contraste">
|
|
47
|
+
<ul>
|
|
48
|
+
<li><strong>Contrastes définis</strong> : couleurs d’arrière‑plan et de texte prévues pour chaque type (info, success, warning, error).</li>
|
|
49
|
+
<li><strong>Adaptation mobile</strong> : réorganisation verticale automatique lorsque le message est long sur petits écrans.</li>
|
|
50
|
+
</ul>
|
|
51
|
+
</CriteriaCard>
|
|
52
|
+
</CriteriaSection>
|
|
53
|
+
|
|
54
|
+
<DemoSection componentName="NotificationBar">
|
|
55
|
+
<Primary />
|
|
56
|
+
</DemoSection>
|
|
57
|
+
|
|
58
|
+
<BestPracticesSection>
|
|
59
|
+
<ul>
|
|
60
|
+
<li>Privilégiez l’option <code>timeout=-1</code> pour laisser le temps de lecture, surtout pour les messages critiques.</li>
|
|
61
|
+
<li>Utilisez <code>type="error"</code> uniquement pour les situations bloquantes afin d’éviter la surcharge d’alertes.</li>
|
|
62
|
+
<li>Ajoutez un libellé explicite au bouton d’action (slot <code>action</code>) et assurez-vous qu’il soit atteignable au clavier.</li>
|
|
63
|
+
<li>Évitez d’empiler trop de notifications : activez <code>show-all</code> en cas de rafale pour limiter la perte contextuelle.</li>
|
|
64
|
+
<li>Ne déplacez pas le focus automatiquement sur la notification : laissez l’utilisateur garder son contexte d’interaction.</li>
|
|
65
|
+
</ul>
|
|
66
|
+
</BestPracticesSection>
|
|
67
|
+
|
|
68
|
+
<ResourcesSection>
|
|
69
|
+
<ul>
|
|
70
|
+
<li><a href="https://www.w3.org/WAI/ARIA/apg/patterns/alert/" target="_blank" rel="noopener noreferrer">WAI-ARIA Authoring Practices – Alert</a></li>
|
|
71
|
+
<li><a href="https://www.w3.org/WAI/ARIA/apg/patterns/status/" target="_blank" rel="noopener noreferrer">WAI-ARIA Authoring Practices – Status</a></li>
|
|
72
|
+
<li><a href="https://www.w3.org/WAI/WCAG21/quickref/#timing-adjustable" target="_blank" rel="noopener noreferrer">WCAG 2.1 – Timing Adjustable</a></li>
|
|
73
|
+
</ul>
|
|
74
|
+
</ResourcesSection>
|
|
75
|
+
</AccessibilityGuideLayout>
|
package/src/components/PageContainer/{AccessibilityGuide.mdx → accessibilite/Accessibility.mdx}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, Primary, Story} from '@storybook/blocks';
|
|
2
|
-
import * as
|
|
2
|
+
import * as PageContainerStories from '../PageContainer.stories.ts';
|
|
3
3
|
import AccessibilityIcon from '@/common/imgs/accessibility-svgrepo-com.svg';
|
|
4
4
|
import {
|
|
5
5
|
AccessibilityGuideLayout,
|
|
@@ -8,16 +8,19 @@ import {
|
|
|
8
8
|
DemoSection,
|
|
9
9
|
BestPracticesSection,
|
|
10
10
|
ResourcesSection,
|
|
11
|
-
} from '
|
|
11
|
+
} from '@/stories/accessibility/AccessibilityGuideLayout.mdx';
|
|
12
12
|
|
|
13
|
-
<Meta of={
|
|
13
|
+
<Meta of={PageContainerStories} />
|
|
14
14
|
|
|
15
15
|
<AccessibilityGuideLayout
|
|
16
16
|
componentName="PageContainer"
|
|
17
17
|
iconSrc={AccessibilityIcon}
|
|
18
18
|
>
|
|
19
19
|
|
|
20
|
-
<
|
|
20
|
+
<div class="mt-2">
|
|
21
|
+
<p>Rapport d’audit manuel : <a href="/audits/PageContainer.xlsx" style={{ color:'#0C41BD' }}>Voir le rapport</a></p>
|
|
22
|
+
<p style={{ color: 'grey', fontSize: '14px', marginTop: '0px' }}>Correctifs associés (<a href="https://github.com/assurance-maladie-digital/design-system-v3/issues/4011" target="_blank" style={{color:'#0C41BD'}}>issue #4011</a>)</p>
|
|
23
|
+
</div>
|
|
21
24
|
|
|
22
25
|
<CriteriaSection>
|
|
23
26
|
<CriteriaCard icon="🔍" title="Structure sémantique">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @vitest-environment jsdom
|
|
2
2
|
|
|
3
|
-
import { describe, it, expect } from 'vitest'
|
|
3
|
+
import { describe, it, expect, afterEach } 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'
|
|
@@ -9,6 +9,10 @@ import PageContainer from '../PageContainer.vue'
|
|
|
9
9
|
// Scénario d’accessibilité : conteneur de page enveloppant un contenu principal.
|
|
10
10
|
|
|
11
11
|
describe('PageContainer – accessibility (axe)', () => {
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
document.body.innerHTML = ''
|
|
14
|
+
})
|
|
15
|
+
|
|
12
16
|
it('has no obvious axe violations with main content slot', async () => {
|
|
13
17
|
const wrapper = mount(PageContainer, {
|
|
14
18
|
slots: {
|
|
@@ -113,7 +117,7 @@ describe('PageContainer – accessibility (axe)', () => {
|
|
|
113
117
|
role: 'navigation',
|
|
114
118
|
},
|
|
115
119
|
slots: {
|
|
116
|
-
default: '<
|
|
120
|
+
default: '<ul><li><a href="#home">Accueil</a></li><li><a href="#about">À propos</a></li></ul>',
|
|
117
121
|
},
|
|
118
122
|
attachTo: document.body,
|
|
119
123
|
})
|
|
@@ -154,7 +158,7 @@ describe('PageContainer – accessibility (axe)', () => {
|
|
|
154
158
|
role: 'contentinfo',
|
|
155
159
|
},
|
|
156
160
|
slots: {
|
|
157
|
-
default: '<
|
|
161
|
+
default: '<div><p>© 2026 - Tous droits réservés</p></div>',
|
|
158
162
|
},
|
|
159
163
|
attachTo: document.body,
|
|
160
164
|
})
|
|
@@ -175,7 +179,7 @@ describe('PageContainer – accessibility (axe)', () => {
|
|
|
175
179
|
role: 'banner',
|
|
176
180
|
},
|
|
177
181
|
slots: {
|
|
178
|
-
default: '<
|
|
182
|
+
default: '<div><h1>Logo</h1></div>',
|
|
179
183
|
},
|
|
180
184
|
attachTo: document.body,
|
|
181
185
|
})
|
|
@@ -286,7 +290,7 @@ describe('PageContainer – accessibility (axe)', () => {
|
|
|
286
290
|
uniqueId: 'footer',
|
|
287
291
|
},
|
|
288
292
|
slots: {
|
|
289
|
-
default: '<
|
|
293
|
+
default: '<div><p>Informations de pied de page</p></div>',
|
|
290
294
|
},
|
|
291
295
|
attachTo: document.body,
|
|
292
296
|
})
|
|
@@ -310,7 +314,7 @@ describe('PageContainer – accessibility (axe)', () => {
|
|
|
310
314
|
uniqueId: 'header',
|
|
311
315
|
},
|
|
312
316
|
slots: {
|
|
313
|
-
default: '<
|
|
317
|
+
default: '<div><h1>En-tête</h1></div>',
|
|
314
318
|
},
|
|
315
319
|
attachTo: document.body,
|
|
316
320
|
})
|
|
@@ -461,9 +465,12 @@ describe('PageContainer – accessibility (axe)', () => {
|
|
|
461
465
|
it('has proper color contrast with different background colors', async () => {
|
|
462
466
|
const wrapper = mount(PageContainer, {
|
|
463
467
|
props: {
|
|
464
|
-
role: '
|
|
468
|
+
role: 'region',
|
|
465
469
|
color: 'surface',
|
|
466
470
|
},
|
|
471
|
+
attrs: {
|
|
472
|
+
'aria-label': 'Bloc coloré',
|
|
473
|
+
},
|
|
467
474
|
slots: {
|
|
468
475
|
default: '<h1>Texte contrasté</h1><p>Paragraphe avec contraste de couleur.</p>',
|
|
469
476
|
},
|