aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/header
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/header')
-rw-r--r--client/src/app/header/header.component.html2
-rw-r--r--client/src/app/header/header.component.ts7
2 files changed, 7 insertions, 2 deletions
diff --git a/client/src/app/header/header.component.html b/client/src/app/header/header.component.html
index 599861817..1bdfe9858 100644
--- a/client/src/app/header/header.component.html
+++ b/client/src/app/header/header.component.html
@@ -1,5 +1,5 @@
1<input 1<input
2 type="text" id="search-video" name="search-video" i18n-placeholder placeholder="Search videos, channels…" 2 type="text" id="search-video" name="search-video" [attr.aria-label]="ariaLabelTextForSearch" i18n-placeholder placeholder="Search videos, channels…"
3 [(ngModel)]="searchValue" (keyup.enter)="doSearch()" 3 [(ngModel)]="searchValue" (keyup.enter)="doSearch()"
4> 4>
5<span (click)="doSearch()" class="icon icon-search"></span> 5<span (click)="doSearch()" class="icon icon-search"></span>
diff --git a/client/src/app/header/header.component.ts b/client/src/app/header/header.component.ts
index 580535669..5fd122930 100644
--- a/client/src/app/header/header.component.ts
+++ b/client/src/app/header/header.component.ts
@@ -5,6 +5,7 @@ import { getParameterByName } from '../shared/misc/utils'
5import { AuthService, ServerService, Notifier } from '@app/core' 5import { AuthService, ServerService, Notifier } from '@app/core'
6import { of } from 'rxjs' 6import { of } from 'rxjs'
7import { ServerConfig } from '@shared/models' 7import { ServerConfig } from '@shared/models'
8import { I18n } from '@ngx-translate/i18n-polyfill'
8 9
9@Component({ 10@Component({
10 selector: 'my-header', 11 selector: 'my-header',
@@ -14,6 +15,7 @@ import { ServerConfig } from '@shared/models'
14 15
15export class HeaderComponent implements OnInit { 16export class HeaderComponent implements OnInit {
16 searchValue = '' 17 searchValue = ''
18 ariaLabelTextForSearch = ''
17 19
18 private serverConfig: ServerConfig 20 private serverConfig: ServerConfig
19 21
@@ -23,10 +25,13 @@ export class HeaderComponent implements OnInit {
23 private auth: AuthService, 25 private auth: AuthService,
24 private serverService: ServerService, 26 private serverService: ServerService,
25 private authService: AuthService, 27 private authService: AuthService,
26 private notifier: Notifier 28 private notifier: Notifier,
29 private i18n: I18n
27 ) {} 30 ) {}
28 31
29 ngOnInit () { 32 ngOnInit () {
33 this.ariaLabelTextForSearch = this.i18n('Search videos, channels')
34
30 this.router.events 35 this.router.events
31 .pipe( 36 .pipe(
32 filter(e => e instanceof NavigationEnd), 37 filter(e => e instanceof NavigationEnd),