From be4978a91c82fafbbae4bc241b8421d24188b2dc Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 9 Jan 2019 17:28:47 +0000 Subject: [PATCH] [ADF-3880] fix header logo a11y (#4114) * fix header logo a11y * fix test --- lib/core/i18n/en.json | 3 +++ lib/core/layout/components/header/header.component.html | 2 +- lib/core/layout/components/header/header.component.spec.ts | 2 +- lib/core/layout/layout.module.ts | 4 +++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/core/i18n/en.json b/lib/core/i18n/en.json index c995ca2b5d..8bb1d5c498 100644 --- a/lib/core/i18n/en.json +++ b/lib/core/i18n/en.json @@ -29,6 +29,9 @@ } }, "CORE": { + "HEADER": { + "LOGO_ARIA": "Company Logo" + }, "FILE_SIZE": { "BYTES": "Bytes", "KB": "KB", diff --git a/lib/core/layout/components/header/header.component.html b/lib/core/layout/components/header/header.component.html index 883882655d..4119c3b223 100644 --- a/lib/core/layout/components/header/header.component.html +++ b/lib/core/layout/components/header/header.component.html @@ -5,7 +5,7 @@ - + {{title}} diff --git a/lib/core/layout/components/header/header.component.spec.ts b/lib/core/layout/components/header/header.component.spec.ts index da7f430883..c3176b2039 100644 --- a/lib/core/layout/components/header/header.component.spec.ts +++ b/lib/core/layout/components/header/header.component.spec.ts @@ -154,7 +154,7 @@ describe('HeaderLayoutComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [HeaderLayoutTesterComponent], - imports: [ LayoutModule, MaterialModule, RouterTestingModule ] + imports: [ CoreTestingModule, LayoutModule, MaterialModule, RouterTestingModule ] }) .compileComponents(); })); diff --git a/lib/core/layout/layout.module.ts b/lib/core/layout/layout.module.ts index 5a66f0546b..b5e98b8126 100644 --- a/lib/core/layout/layout.module.ts +++ b/lib/core/layout/layout.module.ts @@ -27,11 +27,13 @@ import { LayoutContainerComponent } from './components/layout-container/layout-c import { SidebarActionMenuComponent, SidebarMenuDirective, SidebarMenuExpandIconDirective, SidebarMenuTitleIconDirective } from './components/sidebar-action/sidebar-action-menu.component'; import { HeaderLayoutComponent } from './components/header/header.component'; +import { TranslateModule } from '@ngx-translate/core'; @NgModule({ imports: [ CommonModule, MaterialModule, - RouterModule + RouterModule, + TranslateModule.forChild() ], exports: [ SidenavLayoutHeaderDirective,