This commit improves the accessibility of the login page we:
* Made form labels more legible by changing their color to lighter gray
* Added accessible names and roles for password toggle button and language select dropdown
Fixes: https://tracker.ceph.com/issues/55820
Signed-off-by: nsedrickm <nsedrick101@gmail.com>
<div class="container"
*ngIf="isLoginActive">
+ <h1 class="sr-only">Ceph login</h1>
<form name="loginForm"
(ngSubmit)="login()"
#loginForm="ngForm"
<span class="form-group-append">
<button type="button"
class="btn btn-outline-light btn-password h-100 px-4"
- cdPasswordButton="password">
+ cdPasswordButton="password"
+ aria-label="toggle-password">
</button>
</span>
</div>
}
.placeholder {
- color: vv.$gray-600;
+ color: vv.$gray-500;
}
.btn-password:focus {
placement="bottom-right">
<a ngbDropdownToggle
i18n-title
- title="Select a Language">
+ id="toggle-language-button"
+ title="Select a Language"
+ role="button">
{{ allLanguages[selectedLanguage] }}
</a>
- <div ngbDropdownMenu>
+ <div ngbDropdownMenu
+ role="listbox"
+ aria-labelledby="toggle-language-button">
<ng-container *ngFor="let lang of supportedLanguages | keyvalue">
<button ngbDropdownItem
+ role="option"
(click)="changeLanguage(lang.key)">
{{ lang.value }}
</button>