diff --git a/CHANGELOG.md b/CHANGELOG.md index be98142d00..ff66c818ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,11 @@ - **HeaderBar:** Ajout d'un lien vers la page d'accueil sur le logo ([#1612](https://github.com/assurance-maladie-digital/design-system/pull/1612)) ([3f26bbd](https://github.com/assurance-maladie-digital/design-system/commit/3f26bbd928de6c591e72a1b614a633758242bf4b)) - 🐛 **Corrections de bugs** - - **Logo:** Correction du logo Risque Pro ([#1641](https://github.com/assurance-maladie-digital/design-system/pull/1641)) + - **Logo:** Correction du logo Risque Pro ([#1641](https://github.com/assurance-maladie-digital/design-system/pull/1641)) ([c678ffa](https://github.com/assurance-maladie-digital/design-system/commit/c678ffa04fe15cd760055c0887486383cdfba729)) - ♿️ **Accessibilité** - **HeaderBar:** Ajout d'un label sur le bouton pour fermer le menu de navigation ([#1574](https://github.com/assurance-maladie-digital/design-system/pull/1574)) ([19a0e62](https://github.com/assurance-maladie-digital/design-system/commit/19a0e620a9d940de03be1498a83f24a86752234a)) + - **Logo:** Ajout des attributs `role="img"` et `focusable="false"` ([#1642](https://github.com/assurance-maladie-digital/design-system/pull/1642)) ### FormBuilder diff --git a/packages/vue-dot/src/elements/Logo/Logo.vue b/packages/vue-dot/src/elements/Logo/Logo.vue index e6b08f4ce2..cacdcdd3ef 100644 --- a/packages/vue-dot/src/elements/Logo/Logo.vue +++ b/packages/vue-dot/src/elements/Logo/Logo.vue @@ -4,6 +4,8 @@ :aria-label="ariaLabel" :width="dimensions.width" :height="dimensions.height" + role="img" + focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 211 64" > diff --git a/packages/vue-dot/src/elements/Logo/tests/Logo.spec.ts b/packages/vue-dot/src/elements/Logo/tests/Logo.spec.ts new file mode 100644 index 0000000000..0bcca1eb42 --- /dev/null +++ b/packages/vue-dot/src/elements/Logo/tests/Logo.spec.ts @@ -0,0 +1,19 @@ +import Vue from 'vue'; +import { Wrapper } from '@vue/test-utils'; + +import { mountComponent } from '@/tests'; +import { html } from '@/tests/utils/html'; + +import Logo from '../'; + +let wrapper: Wrapper; + +// Tests +describe('Logo', () => { + it('renders correctly', () => { + // Mount component + wrapper = mountComponent(Logo); + + expect(html(wrapper)).toMatchSnapshot(); + }); +}); diff --git a/packages/vue-dot/src/elements/Logo/tests/__snapshots__/Logo.spec.ts.snap b/packages/vue-dot/src/elements/Logo/tests/__snapshots__/Logo.spec.ts.snap new file mode 100644 index 0000000000..8e41533abb --- /dev/null +++ b/packages/vue-dot/src/elements/Logo/tests/__snapshots__/Logo.spec.ts.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Logo renders correctly 1`] = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`;