Accessibility: Add the correct role to the modal backdrop (#59572)

add the correct role to the modal backdrop
This commit is contained in:
Ashley Harrison 2022-12-02 09:30:30 +00:00 committed by GitHub
parent fde9a5d112
commit 11a32bddbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,7 @@ export function Modal(props: PropsWithChildren<Props>) {
return ( return (
<OverlayContainer> <OverlayContainer>
<div <div
role="presentation"
className={styles.modalBackdrop} className={styles.modalBackdrop}
onClick={onClickBackdrop || (closeOnBackdropClick ? onDismiss : undefined)} onClick={onClickBackdrop || (closeOnBackdropClick ? onDismiss : undefined)}
{...underlayProps} {...underlayProps}