️(frontend) improve JoinMeetingDialog screen reader

Focus input on modal open and improve screen reader announcements
This commit is contained in:
Cyril
2026-02-26 09:59:30 +01:00
committed by aleb_the_flash
parent 602bcf3185
commit e8739d7e70
2 changed files with 29 additions and 24 deletions

View File

@@ -22,13 +22,13 @@ and this project adheres to
- 🚚(frontend) rename "wellknown" directory to "well-known" #1009 - 🚚(frontend) rename "wellknown" directory to "well-known" #1009
- 🌐(frontend) localize SR modifier labels #1010 - 🌐(frontend) localize SR modifier labels #1010
- ⬆️(backend) update python dependencies #1011 - ⬆️(backend) update python dependencies #1011
- ♿️(a11y) fix focus ring on tab container components - ♿️(frontend) fix focus ring on tab container components #1012
- ♿️(frontend) upgrade join meeting modal accessibility #1027
### Fixed ### Fixed
- 🩹(frontend) fix German language preference update #1021 - 🩹(frontend) fix German language preference update #1021
## [1.8.0] - 2026-02-20 ## [1.8.0] - 2026-02-20
### Changed ### Changed

View File

@@ -5,28 +5,18 @@ import { isRoomValid } from '@/features/rooms'
export const JoinMeetingDialog = () => { export const JoinMeetingDialog = () => {
const { t } = useTranslation('home') const { t } = useTranslation('home')
return (
<Dialog title={t('joinMeeting')}> const handleSubmit = (data: { roomId?: FormDataEntryValue }) => {
<Form const roomId = (data.roomId as string)
onSubmit={(data) => {
navigateTo(
'room',
(data.roomId as string)
.trim() .trim()
.replace(`${window.location.origin}/`, '') .replace(`${window.location.origin}/`, '')
) navigateTo('room', roomId)
}} }
submitLabel={t('joinInputSubmit')}
> const validateRoomId = (value: string) => {
<Field const trimmed = value.trim()
type="text" if (!trimmed) return null
name="roomId" return !isRoomValid(trimmed) ? (
label={t('joinInputLabel')}
description={t('joinInputExample', {
example: window.origin + '/azer-tyu-qsdf',
})}
validate={(value) => {
return !isRoomValid(value.trim()) ? (
<> <>
<p>{t('joinInputError')}</p> <p>{t('joinInputError')}</p>
<Ul> <Ul>
@@ -35,7 +25,22 @@ export const JoinMeetingDialog = () => {
</Ul> </Ul>
</> </>
) : null ) : null
}} }
return (
<Dialog title={t('joinMeeting')}>
<Form onSubmit={handleSubmit} submitLabel={t('joinInputSubmit')}>
{/* eslint-disable jsx-a11y/no-autofocus -- Focus on input when modal opens, required for accessibility */}
<Field
type="text"
autoFocus
isRequired
name="roomId"
label={t('joinInputLabel')}
description={t('joinInputExample', {
example: window.origin + '/azer-tyu-qsdf',
})}
validate={validateRoomId}
/> />
</Form> </Form>
<H lvl={2}>{t('joinMeetingTipHeading')}</H> <H lvl={2}>{t('joinMeetingTipHeading')}</H>