From eaddae416c7acd8686266bc6f8d95a7b94fb3b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Rame=CC=81?= Date: Mon, 25 Mar 2024 14:22:49 +0100 Subject: [PATCH] fix(sb): disable a11y rules that are always failing with datagrid structure --- .storybook/preview.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.storybook/preview.jsx b/.storybook/preview.jsx index 2ab41bd..fb7344f 100644 --- a/.storybook/preview.jsx +++ b/.storybook/preview.jsx @@ -107,6 +107,18 @@ export const parameters = { id: 'aria-valid-attr-value', selector: '*:not([aria-controls="fr-theme-modal"])', }, + { + // When using the `DataGrid` it says: "Element has children which are not allowed" + // whereas it has `role="rowgroup"` as direct nested elements... it seems a false-positive so ignoring it + // (multiple posts on internet mentions this wrong trigger) + id: 'aria-required-children', + selector: '*:not(.MuiDataGrid-root)', + }, + { + // Cannot add the missign piece triggering the error + id: 'scrollable-region-focusable', + selector: '*:not(.MuiDataGrid-virtualScroller)', + }, { // `react-dsfr` uses the same id for desktop and mobile for their quick access items id: 'duplicate-id-active',