Skip to content

Commit

Permalink
fix(sb): disable a11y rules that are always failing with datagrid str…
Browse files Browse the repository at this point in the history
…ucture
  • Loading branch information
sneko committed Mar 25, 2024
1 parent 3ae9020 commit 6a73024
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion src/pages/api/dataset/initiatives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export async function handler(req: NextApiRequest, res: NextApiResponse) {
},
},
},
take: 5,
orderBy: {
name: 'asc',
},
Expand Down

0 comments on commit 6a73024

Please sign in to comment.