️(Modal) remove tabindex from content modal

The screen reader was reading the content of the
modal as a focusable element, but the content of
the modal is not interactive.
This change removes the tabindex from the content
modal in the Modal component.
This commit is contained in:
Anthony LC
2026-02-26 17:33:31 +01:00
committed by Anthony LC
parent 3aeacdd32a
commit b6e2b666c9
2 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,11 @@
# @gouvfr-lasuite/cunningham-react # @gouvfr-lasuite/cunningham-react
## [unreleased]
### Minor Changes
- ♿️(Modal) remove tabindex from content modal
## 4.2.0 ## 4.2.0
### Minor Changes ### Minor Changes

View File

@@ -113,8 +113,7 @@ export const ModalInner = ({ closeOnEsc = true, ...props }: ModalProps) => {
)} )}
{props.title && <div className="c__modal__title">{props.title}</div>} {props.title && <div className="c__modal__title">{props.title}</div>}
{/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */} <div className="c__modal__content">
<div className="c__modal__content" tabIndex={0}>
{props.children} {props.children}
</div> </div>
<ModalFooter {...props} /> <ModalFooter {...props} />