Skip to content

Commit 51c13b6

Browse files
authored
Merge pull request #3593 from DSpace/backport-3272-to-dspace-8_x
[Port dspace-8_x] Improving accessibility on the new user registration page
2 parents 303d59e + ebc7a75 commit 51c13b6

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

src/app/register-email-form/register-email-form.component.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ <h1>{{MESSAGE_PREFIX + '.header'|translate}}</h1>
1414
<label class="font-weight-bold"
1515
for="email">{{MESSAGE_PREFIX + '.email' | translate}}</label>
1616
<input [className]="(email.invalid) && (email.dirty || email.touched) ? 'form-control is-invalid' :'form-control'"
17-
type="text" id="email" formControlName="email"/>
17+
type="text" id="email" formControlName="email"
18+
[attr.aria-label]="MESSAGE_PREFIX + '.aria.label' | translate"
19+
[attr.aria-describedby]="(!email.errors) ? '' : (email.errors.required ? 'email-errors-required' : 'email-error-not-valid')"
20+
[attr.aria-invalid]="email.invalid"/>
1821
<div *ngIf="email.invalid && (email.dirty || email.touched)"
1922
class="invalid-feedback show-feedback">
20-
<span *ngIf="email.errors && email.errors.required">
23+
<span *ngIf="email.errors && email.errors.required" id="email-errors-required">
2124
{{ MESSAGE_PREFIX + '.email.error.required' | translate }}
2225
</span>
23-
<span *ngIf="email.errors && ((email.errors.pattern && this.typeRequest === TYPE_REQUEST_REGISTER) || email.errors.email)">
26+
<span *ngIf="email.errors && ((email.errors.pattern && this.typeRequest === TYPE_REQUEST_REGISTER) || email.errors.email)" id="email-error-not-valid">
2427
{{ MESSAGE_PREFIX + '.email.error.not-email-form' | translate }}
2528
<ng-container *ngIf="validMailDomains.length > 0">
2629
{{ MESSAGE_PREFIX + '.email.error.not-valid-domain' | translate: { domains: validMailDomains.join(', ') } }}

src/app/register-email-form/register-email-form.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,5 +290,4 @@ export class RegisterEmailFormComponent implements OnDestroy, OnInit {
290290
console.warn(`Unimplemented notification '${key}' from reCaptcha service`);
291291
}
292292
}
293-
294293
}

src/assets/i18n/en.json5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6741,4 +6741,8 @@
67416741
"item.page.cc.license.disclaimer": "Except where otherwised noted, this item's license is described as",
67426742

67436743
"browse.search-form.placeholder": "Search the repository",
6744+
6745+
"register-page.registration.aria.label": "Enter your e-mail address",
6746+
6747+
"forgot-email.form.aria.label": "Enter your e-mail address",
67446748
}

src/assets/i18n/es.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8152,5 +8152,11 @@
81528152
//"browse.search-form.placeholder": "Search the repository",
81538153
"browse.search-form.placeholder": "Buscar en el repositorio",
81548154

8155+
// "register-page.registration.aria.label": "Enter your e-mail address",
8156+
"register-page.registration.aria.label": "Introduzca su dirección de correo electrónico",
8157+
8158+
// "forgot-email.form.aria.label": "Enter your e-mail address",
8159+
"forgot-email.form.aria.label": "Introduzca su dirección de correo electrónico",
8160+
81558161

81568162
}

src/assets/i18n/pt-BR.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10249,4 +10249,10 @@
1024910249

1025010250
//"browse.search-form.placeholder": "Search the repository",
1025110251
"browse.search-form.placeholder": "Buscar no repositório",
10252+
10253+
// "register-page.registration.aria.label": "Enter your e-mail address",
10254+
"register-page.registration.aria.label": "Digite seu e-mail",
10255+
10256+
// "forgot-email.form.aria.label": "Enter your e-mail address",
10257+
"forgot-email.form.aria.label": "Digite seu e-mail",
1025210258
}

0 commit comments

Comments
 (0)