fix(a11y/dialogs) fix wrongly used aria attributes for dialog labels:

aria-describedby and aria-labelledby expect dom element ids as their
values, not label/description strings. we use aria-description and
aria-label for that.
This commit is contained in:
Emmanuel Pelletier 2023-02-27 17:22:46 +01:00
parent e071a11f0d
commit 2d9f9fd8b9
1 changed files with 2 additions and 2 deletions

View File

@ -186,8 +186,8 @@ const BaseDialog = ({
className = { classes.focusLock }
returnFocus = { true }>
<div
aria-describedby = { description }
aria-labelledby = { title ?? t(titleKey ?? '') }
aria-description = { description }
aria-label = { title ?? t(titleKey ?? '') }
aria-modal = { true }
className = { cx(classes.modal, isUnmounting && 'unmount', size, className) }
role = 'dialog'>