fix(dialog) Fix initial focus (#12509)

Don't focus on the close button if there's another focusable element
This commit is contained in:
Robert Pintilii 2022-11-09 12:07:37 +02:00 committed by GitHub
parent f3e4c57036
commit cbb8b5f620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -282,8 +282,14 @@ const Dialog = ({
onClick = { onClose } />
)}
</div>
<div className = { classes.content }>{children}</div>
<div className = { classes.footer }>
<div
className = { classes.content }
data-autofocus-inside = 'true'>
{children}
</div>
<div
className = { classes.footer }
data-autofocus-inside = 'true'>
{!back.hidden && <Button
accessibilityLabel = { t(back.translationKey ?? '') }
labelKey = { back.translationKey }

View File

@ -37,7 +37,8 @@ function CopyMeetingLinkSection({ url }: IProps) {
<>
<label
className = { classes.label }
htmlFor = { 'copy-button-id' }>{t('addPeople.shareLink')}</label>
htmlFor = { 'copy-button-id' }
id = 'copy-button-label'>{t('addPeople.shareLink')}</label>
<CopyButton
aria-label = { t('addPeople.copyLink') }
className = 'invite-more-dialog-conference-url'