Skip to content

Commit 48ba77b

Browse files
committed
🔥(frontend) remove patch following upgrade of Cunningham
A patch about tabindex was added to the codebase to fix an accessibility issue. However, after upgrading Cunningham, the issue seems to have been resolved and the patch is no longer necessary. Therefore, we are removing the patch to keep our code clean and maintainable.
1 parent 41f76eb commit 48ba77b

2 files changed

Lines changed: 6 additions & 16 deletions

File tree

src/frontend/apps/impress/src/components/modal/AlertModal.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
ModalDefaultVariantProps,
66
ModalSize,
77
} from '@gouvfr-lasuite/cunningham-react';
8-
import { ReactNode, useEffect } from 'react';
8+
import { ReactNode } from 'react';
99
import { useTranslation } from 'react-i18next';
1010

1111
import { Box } from '../Box';
@@ -35,21 +35,6 @@ export const AlertModal = ({
3535
}: AlertModalProps) => {
3636
const { t } = useTranslation();
3737

38-
/**
39-
* TODO:
40-
* Remove this effect when Cunningham will have this patch released:
41-
* https://github.com/suitenumerique/cunningham/pull/377
42-
*/
43-
useEffect(() => {
44-
const timeout = setTimeout(() => {
45-
const contents = document.querySelectorAll('.c__modal__content');
46-
contents.forEach((content) => {
47-
content.setAttribute('tabindex', '-1');
48-
});
49-
}, 100);
50-
return () => clearTimeout(timeout);
51-
}, []);
52-
5338
return (
5439
<Modal
5540
closeOnClickOutside

src/frontend/apps/impress/src/features/docs/doc-tree/components/DocTree.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ export const DocTree = ({ currentDoc }: DocTreeProps) => {
271271
aria-label={t('Document tree')}
272272
aria-describedby="doc-tree-keyboard-instructions"
273273
$css={css`
274+
/**
275+
* TODO: When this pull request is merged (https://github.com/suitenumerique/ui-kit/pull/215), we
276+
* should remove the pointer-events manipulation.
277+
* See: https://github.com/suitenumerique/docs/commit/d41e44dcd5a4111463b1bddfdab640faacbf1795
278+
*/
274279
/* Remove outline from TreeViewItem wrapper elements */
275280
.c__tree-view--row {
276281
outline: none !important;

0 commit comments

Comments
 (0)