mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
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:
@@ -1 +1,2 @@
|
|||||||
|
<h1 class="sr-only">{{ pageHeading | translate }}</h1>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
|
|||||||
@@ -1,4 +1,15 @@
|
|||||||
:host {
|
:host {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
|
.sr-only {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
padding: 0;
|
||||||
|
margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
clip: rect(0, 0, 0, 0);
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ import { INITIAL_APP_STATE } from './store/initial-state';
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit, OnDestroy {
|
export class AppComponent implements OnInit, OnDestroy {
|
||||||
onDestroy$: Subject<boolean> = new Subject<boolean>();
|
onDestroy$: Subject<boolean> = new Subject<boolean>();
|
||||||
|
pageHeading = '';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@@ -111,6 +112,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
const snapshot: any = event.snapshot || {};
|
const snapshot: any = event.snapshot || {};
|
||||||
const data: any = snapshot.data || {};
|
const data: any = snapshot.data || {};
|
||||||
|
|
||||||
|
this.pageHeading = data.title || '';
|
||||||
pageTitle.setTitle(data.title || '');
|
pageTitle.setTitle(data.title || '');
|
||||||
this.store.dispatch(new SetCurrentUrlAction(router.url));
|
this.store.dispatch(new SetCurrentUrlAction(router.url));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user