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

Improving accessibility on the new user registration page #3272

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 @@ -290,5 +290,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 @@ -6739,4 +6739,8 @@
"item.page.cc.license.disclaimer": "Except where otherwised noted, this item's license is described as",

"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 @@ -8152,5 +8152,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 @@ -10249,4 +10249,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