Merge pull request #1228 from Alfresco/dev-pionnegru-ACA-2130

[ACA-2130] App - page must contain a level-one heading
This commit is contained in:
Denys Vuika
2019-10-17 16:03:18 +01:00
committed by GitHub
3 changed files with 14 additions and 0 deletions
+1
View File
@@ -1 +1,2 @@
<h1 class="sr-only">{{ pageHeading | translate }}</h1>
<router-outlet></router-outlet>
+11
View File
@@ -1,4 +1,15 @@
:host {
display: flex;
flex: 1;
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
}
+2
View File
@@ -59,6 +59,7 @@ import { INITIAL_APP_STATE } from './store/initial-state';
})
export class AppComponent implements OnInit, OnDestroy {
onDestroy$: Subject<boolean> = new Subject<boolean>();
pageHeading = '';
constructor(
private route: ActivatedRoute,
@@ -111,6 +112,7 @@ export class AppComponent implements OnInit, OnDestroy {
const snapshot: any = event.snapshot || {};
const data: any = snapshot.data || {};
this.pageHeading = data.title || '';
pageTitle.setTitle(data.title || '');
this.store.dispatch(new SetCurrentUrlAction(router.url));
});