♿️(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:
@@ -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
|
||||||
|
|||||||
@@ -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} />
|
||||||
|
|||||||
Reference in New Issue
Block a user