Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dull-rocks-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Adds missing legend for fieldset in profile page to meet WCAG compliance
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
import { useMutation } from '@tanstack/react-query';
import type { AllHTMLAttributes, ReactElement } from 'react';
import { useId, useCallback } from 'react';
import { VisuallyHidden } from 'react-aria';
import { Controller, useFormContext } from 'react-hook-form';

import type { AccountProfileFormValues } from './getProfileInitialValues';
Expand Down Expand Up @@ -142,6 +143,9 @@ const AccountProfileForm = (props: AllHTMLAttributes<HTMLFormElement>): ReactEle
return (
<Box {...props} is='form' autoComplete='off' onSubmit={handleSubmit(handleSave)}>
<FieldGroup>
<VisuallyHidden>
<legend>{t('Profile_details')}</legend>
</VisuallyHidden>
<Field>
<Controller
control={control}
Expand Down Expand Up @@ -240,7 +244,12 @@ const AccountProfileForm = (props: AllHTMLAttributes<HTMLFormElement>): ReactEle
<Controller
control={control}
name='statusText'
rules={{ maxLength: { value: USER_STATUS_TEXT_MAX_LENGTH, message: t('Max_length_is', USER_STATUS_TEXT_MAX_LENGTH) } }}
rules={{
maxLength: {
value: USER_STATUS_TEXT_MAX_LENGTH,
message: t('Max_length_is', USER_STATUS_TEXT_MAX_LENGTH),
},
}}
render={({ field }) => (
<TextInput
{...field}
Expand Down
Loading