From db9183d2cf78ba35cae7bfb0806688208046e94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Martin?= Date: Wed, 23 Jul 2025 22:51:21 +0200 Subject: [PATCH 1/9] Improve accessibility of form fields in AddEditUserDialog See https://mui.com/material-ui/api/text-field/ --- ui/src/user/AddEditUserDialog.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/src/user/AddEditUserDialog.tsx b/ui/src/user/AddEditUserDialog.tsx index cad98ce..2ee7812 100644 --- a/ui/src/user/AddEditUserDialog.tsx +++ b/ui/src/user/AddEditUserDialog.tsx @@ -56,6 +56,8 @@ export default class AddEditDialog extends Component { label="Name *" type="email" value={name} + name="username" + id="username" onChange={this.handleChange.bind(this, 'name')} fullWidth /> @@ -66,6 +68,8 @@ export default class AddEditDialog extends Component { value={pass} fullWidth label={isEdit ? 'Pass (empty if no change)' : 'Pass *'} + name="password" + id="password" onChange={this.handleChange.bind(this, 'pass')} /> Date: Wed, 23 Jul 2025 22:54:29 +0200 Subject: [PATCH 2/9] Remove `type="email"` from username field in AddEditUserDialog As the username doesn't have to be an email, having email as the type is incorrect. This change also makes it more consistent with the way it is defined in the login form. --- ui/src/user/AddEditUserDialog.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/src/user/AddEditUserDialog.tsx b/ui/src/user/AddEditUserDialog.tsx index 2ee7812..fb85d09 100644 --- a/ui/src/user/AddEditUserDialog.tsx +++ b/ui/src/user/AddEditUserDialog.tsx @@ -54,7 +54,6 @@ export default class AddEditDialog extends Component { margin="dense" className="name" label="Name *" - type="email" value={name} name="username" id="username" From fc84fb3c8b50c28971899bef2f5a065fb49c5ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Martin?= Date: Wed, 23 Jul 2025 22:57:27 +0200 Subject: [PATCH 3/9] Make wording of form fields in AddEditUserDialog consistent with the login The login form says username and password and should be consistently used throughout. --- ui/src/user/AddEditUserDialog.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/user/AddEditUserDialog.tsx b/ui/src/user/AddEditUserDialog.tsx index fb85d09..731fabf 100644 --- a/ui/src/user/AddEditUserDialog.tsx +++ b/ui/src/user/AddEditUserDialog.tsx @@ -53,7 +53,7 @@ export default class AddEditDialog extends Component { autoFocus margin="dense" className="name" - label="Name *" + label="Username *" value={name} name="username" id="username" @@ -66,7 +66,7 @@ export default class AddEditDialog extends Component { type="password" value={pass} fullWidth - label={isEdit ? 'Pass (empty if no change)' : 'Pass *'} + label={isEdit ? 'Password (empty if no change)' : 'Password *'} name="password" id="password" onChange={this.handleChange.bind(this, 'pass')} @@ -92,7 +92,7 @@ export default class AddEditDialog extends Component { ? passPresent ? '' : 'password is required' - : 'name is required' + : 'username is required' }>