Explain why I've added aria-describedby={undefined}

This commit is contained in:
Robin 2024-09-10 16:24:58 -04:00
parent fa36fcd3a2
commit 8872b879d8

View File

@ -98,6 +98,8 @@ export const Modal: FC<Props> = ({
styles.drawer, styles.drawer,
{ [styles.tabbed]: tabbed }, { [styles.tabbed]: tabbed },
)} )}
// Suppress the warning about there being no description; the modal
// has an accessible title
aria-describedby={undefined} aria-describedby={undefined}
{...rest} {...rest}
> >
@ -121,6 +123,8 @@ export const Modal: FC<Props> = ({
<DialogOverlay <DialogOverlay
className={classNames(overlayStyles.bg, overlayStyles.animate)} className={classNames(overlayStyles.bg, overlayStyles.animate)}
/> />
{/* Suppress the warning about there being no description; the modal
has an accessible title */}
<DialogContent asChild aria-describedby={undefined} {...rest}> <DialogContent asChild aria-describedby={undefined} {...rest}>
<Glass <Glass
className={classNames( className={classNames(