Skip to content

Commit afd6fda

Browse files
138319: Fixed small accessibility issues
- Links with different destinations: the breadcrumbs & the header logo both point to the Home page but used different links - The accessibility settings page didn't have a h1 & didn't link its labels & input fields correctly - Add missing autocomplete attribute to feedback form & remove title on inputs - Disabled autocomplete on search navbar
1 parent b0f6370 commit afd6fda

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

src/app/breadcrumbs/breadcrumbs.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<nav aria-label="breadcrumb" class="nav-breadcrumb">
44
<ol class="container breadcrumb my-0">
55
<ng-container
6-
*ngTemplateOutlet="breadcrumbs?.length > 0 ? breadcrumb : activeBreadcrumb; context: {text: 'home.breadcrumbs', url: '/'}"></ng-container>
6+
*ngTemplateOutlet="breadcrumbs?.length > 0 ? breadcrumb : activeBreadcrumb; context: {text: 'home.breadcrumbs', url: '/home'}"></ng-container>
77
@for (bc of breadcrumbs; track bc; let last = $last) {
88
<ng-container *ngTemplateOutlet="!last ? breadcrumb : activeBreadcrumb; context: bc"></ng-container>
99
}

src/app/info/accessibility-settings/accessibility-settings.component.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<div class="container">
2-
<h2>{{ 'info.accessibility-settings.title' | translate }}</h2>
2+
<h1>{{ 'info.accessibility-settings.title' | translate }}</h1>
33

44
<form>
55
<div class="form-group row">
6-
<label [for]="'disableNotificationTimeOutInput'" class="col-sm-4 col-form-label">
6+
<span aria-hidden="true" class="col-sm-4 col-form-label">
77
{{ 'info.accessibility-settings.disableNotificationTimeOut.label' | translate }}
8-
</label>
8+
</span>
99

1010
<div class="col-sm-4">
11-
<ui-switch [id]="'disableNotificationTimeOutInput'"
11+
<ui-switch [ariaLabel]="'info.accessibility-settings.disableNotificationTimeOut.label' | translate"
1212
[(ngModel)]="formValues.notificationTimeOutEnabled"
1313
[ngModelOptions]="{ standalone: true }"
1414
></ui-switch>
@@ -33,8 +33,7 @@ <h2>{{ 'info.accessibility-settings.title' | translate }}</h2>
3333
[ngClass]="{'is-invalid': !settingsService.isValid('notificationTimeOut', formValues)}"
3434
[min]="1"
3535
[readOnly]="!formValues.notificationTimeOutEnabled"
36-
[(ngModel)]="formValues.notificationTimeOut" [ngModelOptions]="{ standalone: true }"
37-
[attr.aria-describedby]="'notificationTimeOutHint'">
36+
[(ngModel)]="formValues.notificationTimeOut" [ngModelOptions]="{ standalone: true }">
3837
<div class="invalid-feedback" [ngClass]="{ 'd-block': !settingsService.isValid('notificationTimeOut', formValues) }">
3938
{{ 'info.accessibility-settings.notificationTimeOut.invalid' | translate }}
4039
</div>
@@ -59,8 +58,7 @@ <h2>{{ 'info.accessibility-settings.title' | translate }}</h2>
5958
<input [type]="'number'" [id]="'liveRegionTimeOutInput'" class="form-control"
6059
[ngClass]="{'is-invalid': !settingsService.isValid('liveRegionTimeOut', formValues)}"
6160
[min]="1"
62-
[(ngModel)]="formValues.liveRegionTimeOut" [ngModelOptions]="{ standalone: true }"
63-
[attr.aria-describedby]="'liveRegionTimeOutHint'">
61+
[(ngModel)]="formValues.liveRegionTimeOut" [ngModelOptions]="{ standalone: true }">
6462
<div class="invalid-feedback" [ngClass]="{ 'd-block': !settingsService.isValid('liveRegionTimeOut', formValues) }">
6563
{{ 'info.accessibility-settings.liveRegionTimeOut.invalid' | translate }}
6664
</div>

src/app/info/feedback/feedback-form/feedback-form.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h1>{{ 'info.feedback.head' | translate }}</h1>
66
<div class="row mt-3">
77
<div class="control-group col-sm-12">
88
<label class="control-label form-label" for="email">{{ 'info.feedback.email-label' | translate }}&nbsp;</label>
9-
<input id="email" class="form-control" name="email" type="text" value="" formControlName="email" autofocus="autofocus" title="{{ 'info.feedback.email_help' | translate }}">
9+
<input autocomplete="email" id="email" class="form-control" name="email" type="text" value="" formControlName="email" autofocus="autofocus">
1010
<small class="text-muted">{{ 'info.feedback.email_help' | translate }}</small>
1111
</div>
1212
</div>
@@ -27,7 +27,7 @@ <h1>{{ 'info.feedback.head' | translate }}</h1>
2727
<div class="row mt-3">
2828
<div class="control-group col-sm-12">
2929
<label class="control-label form-label" for="comments">{{ 'info.feedback.comments' | translate }}:&nbsp;</label>
30-
<textarea id="comments" formControlName="message" class="form-control" name="message" cols="20" rows="5"> </textarea>
30+
<textarea autocomplete="off" id="comments" formControlName="message" class="form-control" name="message" cols="20" rows="5"> </textarea>
3131
</div>
3232
</div>
3333

@@ -44,7 +44,7 @@ <h1>{{ 'info.feedback.head' | translate }}</h1>
4444
<div class="row mt-3">
4545
<div class="control-group col-sm-12">
4646
<label class="control-label form-labe" for="page">{{ 'info.feedback.page-label' | translate }}&nbsp;</label>
47-
<input id="page" readonly class="form-control" name="page" type="text" value="" formControlName="page" autofocus="autofocus" title="{{ 'info.feedback.page_help' | translate }}">
47+
<input autocomplete="off" id="page" readonly class="form-control" name="page" type="text" value="" formControlName="page" autofocus="autofocus">
4848
<small class="text-muted">{{ 'info.feedback.page_help' | translate }}</small>
4949
</div>
5050
</div>

src/app/search-navbar/search-navbar.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<div [title]="'nav.search' | translate" (dsClickOutside)="collapse()">
1+
<div (dsClickOutside)="collapse()">
22
<div class="d-inline-block position-relative">
3-
<form [formGroup]="searchForm" (ngSubmit)="onSubmit(searchForm.value)" autocomplete="on" class="d-flex">
3+
<form [formGroup]="searchForm" (ngSubmit)="onSubmit(searchForm.value)" class="d-flex">
44
<input #searchInput [@toggleAnimation]="isExpanded" [attr.aria-label]="('nav.search' | translate)" name="query"
55
formControlName="query" type="text" placeholder="{{searchExpanded ? ('nav.search' | translate) : ''}}"
6+
autocomplete="off"
67
class="d-inline-block bg-transparent position-absolute form-control dropdown-menu-right p1"
78
[class.display]="searchExpanded ? 'inline-block' : 'none'"
89
[tabIndex]="searchExpanded ? 0 : -1"

0 commit comments

Comments
 (0)