Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Port dspace-7_x] Improving accessibility on the new user registration page #3592

Merged
merged 6 commits into from
Nov 1, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ <h1>{{MESSAGE_PREFIX + '.header'|translate}}</h1>
<label class="font-weight-bold"
for="email">{{MESSAGE_PREFIX + '.email' | translate}}</label>
<input [className]="(email.invalid) && (email.dirty || email.touched) ? 'form-control is-invalid' :'form-control'"
type="text" id="email" formControlName="email"/>
type="text" id="email" formControlName="email"
[attr.aria-label]="MESSAGE_PREFIX + '.aria.label' | translate"
[attr.aria-describedby]="(!email.errors) ? '' : (email.errors.required ? 'email-errors-required' : 'email-error-not-valid')"
[attr.aria-invalid]="email.invalid"/>
<div *ngIf="email.invalid && (email.dirty || email.touched)"
class="invalid-feedback show-feedback">
<span *ngIf="email.errors && email.errors.required">
<span *ngIf="email.errors && email.errors.required" id="email-errors-required">
{{ MESSAGE_PREFIX + '.email.error.required' | translate }}
</span>
<span *ngIf="email.errors && ((email.errors.pattern && this.typeRequest === TYPE_REQUEST_REGISTER) || email.errors.email)">
<span *ngIf="email.errors && ((email.errors.pattern && this.typeRequest === TYPE_REQUEST_REGISTER) || email.errors.email)" id="email-error-not-valid">
{{ MESSAGE_PREFIX + '.email.error.not-email-form' | translate }}
<ng-container *ngIf="validMailDomains.length > 0">
{{ MESSAGE_PREFIX + '.email.error.not-valid-domain' | translate: { domains: validMailDomains.join(', ') } }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,4 @@ export class RegisterEmailFormComponent implements OnDestroy, OnInit {
console.warn(`Unimplemented notification '${key}' from reCaptcha service`);
}
}

}
4 changes: 4 additions & 0 deletions src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5369,4 +5369,8 @@
"process.overview.unknown.user": "Unknown",

"browse.search-form.placeholder": "Search the repository",

"register-page.registration.aria.label": "Enter your e-mail address",

"forgot-email.form.aria.label": "Enter your e-mail address",
}
6 changes: 6 additions & 0 deletions src/assets/i18n/es.json5
Original file line number Diff line number Diff line change
Expand Up @@ -7831,5 +7831,11 @@
//"browse.search-form.placeholder": "Search the repository",
"browse.search-form.placeholder": "Buscar en el repositorio",

// "register-page.registration.aria.label": "Enter your e-mail address",
"register-page.registration.aria.label": "Introduzca su dirección de correo electrónico",

// "forgot-email.form.aria.label": "Enter your e-mail address",
"forgot-email.form.aria.label": "Introduzca su dirección de correo electrónico",


}
6 changes: 6 additions & 0 deletions src/assets/i18n/pt-BR.json5
Original file line number Diff line number Diff line change
Expand Up @@ -7857,4 +7857,10 @@

//"browse.search-form.placeholder": "Search the repository",
"browse.search-form.placeholder": "Buscar no repositório",

// "register-page.registration.aria.label": "Enter your e-mail address",
"register-page.registration.aria.label": "Digite seu e-mail",

// "forgot-email.form.aria.label": "Enter your e-mail address",
"forgot-email.form.aria.label": "Digite seu e-mail",
}
Loading