mirror of
https://github.com/suitenumerique/docs.git
synced 2026-08-31 12:19:45 +02:00
🔥(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.
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
ModalDefaultVariantProps,
|
||||
ModalSize,
|
||||
} from '@gouvfr-lasuite/cunningham-react';
|
||||
import { ReactNode, useEffect } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { Box } from '../Box';
|
||||
@@ -35,21 +35,6 @@ export const AlertModal = ({
|
||||
}: AlertModalProps) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
* Remove this effect when Cunningham will have this patch released:
|
||||
* https://github.com/suitenumerique/cunningham/pull/377
|
||||
*/
|
||||
useEffect(() => {
|
||||
const timeout = setTimeout(() => {
|
||||
const contents = document.querySelectorAll('.c__modal__content');
|
||||
contents.forEach((content) => {
|
||||
content.setAttribute('tabindex', '-1');
|
||||
});
|
||||
}, 100);
|
||||
return () => clearTimeout(timeout);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
closeOnClickOutside
|
||||
|
||||
@@ -271,6 +271,11 @@ export const DocTree = ({ currentDoc }: DocTreeProps) => {
|
||||
aria-label={t('Document tree')}
|
||||
aria-describedby="doc-tree-keyboard-instructions"
|
||||
$css={css`
|
||||
/**
|
||||
* TODO: When this pull request is merged (https://github.com/suitenumerique/ui-kit/pull/215), we
|
||||
* should remove the pointer-events manipulation.
|
||||
* See: https://github.com/suitenumerique/docs/commit/d41e44dcd5a4111463b1bddfdab640faacbf1795
|
||||
*/
|
||||
/* Remove outline from TreeViewItem wrapper elements */
|
||||
.c__tree-view--row {
|
||||
outline: none !important;
|
||||
|
||||
Reference in New Issue
Block a user