From a435ddb7e1a92af6fd88008d8127ddb8a3d8c8d5 Mon Sep 17 00:00:00 2001 From: Vendeville Antoine Date: Mon, 25 Mar 2024 10:23:48 +0100 Subject: [PATCH] fix(vtmn/svelte): VtmnListItem tabindex can be false --- .../src/components/structure/VtmnListItem/VtmnListItem.svelte | 2 +- .../components/structure/VtmnListItem/test/VtmnListItem.spec.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/sources/svelte/src/components/structure/VtmnListItem/VtmnListItem.svelte b/packages/sources/svelte/src/components/structure/VtmnListItem/VtmnListItem.svelte index f82778509..ca25712fd 100644 --- a/packages/sources/svelte/src/components/structure/VtmnListItem/VtmnListItem.svelte +++ b/packages/sources/svelte/src/components/structure/VtmnListItem/VtmnListItem.svelte @@ -103,7 +103,7 @@ {#if href} { }); expect(getByRole('link')).toHaveAttribute('href', 'https://decathlon.fr'); expect(getByRole('link')).toHaveAttribute('aria-disabled', 'true'); + expect(getByRole('link')).toHaveAttribute('tabindex', '-1'); }); test('Should have a link _blank with noopener noreferrer', () => { const { getByRole } = render(VtmnListItem, { @@ -96,5 +97,6 @@ describe('VtmnListItem', () => { expect(getByRole('link')).toHaveAttribute('href', 'https://decathlon.fr'); expect(getByRole('link')).toHaveAttribute('target', '_blank'); expect(getByRole('link')).toHaveAttribute('rel', 'noopener noreferrer'); + expect(getByRole('link')).toHaveAttribute('tabindex', undefined); }); });