Merge pull request #815 from martinfrancois/master

Consistency and Accessibility Improvements of the user-related UIs
This commit is contained in:
Jannis Mattheis 2025-07-26 10:28:53 +02:00 committed by GitHub
commit a9ecbdc94e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 9 deletions

View File

@ -53,9 +53,10 @@ export default class AddEditDialog extends Component<IProps, IState> {
autoFocus autoFocus
margin="dense" margin="dense"
className="name" className="name"
label="Name *" label="Username *"
type="email"
value={name} value={name}
name="username"
id="username"
onChange={this.handleChange.bind(this, 'name')} onChange={this.handleChange.bind(this, 'name')}
fullWidth fullWidth
/> />
@ -65,7 +66,9 @@ export default class AddEditDialog extends Component<IProps, IState> {
type="password" type="password"
value={pass} value={pass}
fullWidth 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')} onChange={this.handleChange.bind(this, 'pass')}
/> />
<FormControlLabel <FormControlLabel
@ -89,7 +92,7 @@ export default class AddEditDialog extends Component<IProps, IState> {
? passPresent ? passPresent
? '' ? ''
: 'password is required' : 'password is required'
: 'name is required' : 'username is required'
}> }>
<div> <div>
<Button <Button

View File

@ -28,17 +28,21 @@ class Login extends Component<Stores<'currentUser'>> {
<form onSubmit={this.preventDefault} id="login-form"> <form onSubmit={this.preventDefault} id="login-form">
<TextField <TextField
autoFocus autoFocus
id="username"
className="name" className="name"
label="Username" label="Username"
name="username"
margin="dense" margin="dense"
autoComplete="username" autoComplete="username"
value={username} value={username}
onChange={(e) => (this.username = e.target.value)} onChange={(e) => (this.username = e.target.value)}
/> />
<TextField <TextField
id="password"
type="password" type="password"
className="password" className="password"
label="Password" label="Password"
name="password"
margin="normal" margin="normal"
autoComplete="current-password" autoComplete="current-password"
value={password} value={password}

View File

@ -46,21 +46,26 @@ export default class RegistrationDialog extends Component<IProps, IState> {
<DialogContent> <DialogContent>
<TextField <TextField
autoFocus autoFocus
id="register-username"
margin="dense" margin="dense"
className="name" className="name"
label="Name *" label="Username *"
type="email" name="username"
value={name} value={name}
autoComplete="username"
onChange={this.handleChange.bind(this, 'name')} onChange={this.handleChange.bind(this, 'name')}
fullWidth fullWidth
/> />
<TextField <TextField
id="register-password"
margin="dense" margin="dense"
className="password" className="password"
type="password" type="password"
value={pass} value={pass}
fullWidth fullWidth
label="Pass *" label="Password *"
name="password"
autoComplete="new-password"
onChange={this.handleChange.bind(this, 'pass')} onChange={this.handleChange.bind(this, 'pass')}
/> />
</DialogContent> </DialogContent>
@ -73,7 +78,7 @@ export default class RegistrationDialog extends Component<IProps, IState> {
? passPresent ? passPresent
? '' ? ''
: 'password is required' : 'password is required'
: 'name is required' : 'username is required'
}> }>
<div> <div>
<Button <Button

View File

@ -84,7 +84,7 @@ class Users extends Component<WithStyles<'wrapper'> & Stores<'userStore'>> {
<Table id="user-table"> <Table id="user-table">
<TableHead> <TableHead>
<TableRow style={{textAlign: 'center'}}> <TableRow style={{textAlign: 'center'}}>
<TableCell>Name</TableCell> <TableCell>Username</TableCell>
<TableCell>Admin</TableCell> <TableCell>Admin</TableCell>
<TableCell /> <TableCell />
</TableRow> </TableRow>