Skip to content
Snippets Groups Projects
Commit d8d89867 authored by Emine Erbay's avatar Emine Erbay Committed by Klaus-Dieter Quibeldey-Cirkel
Browse files

Resolve "Make "Delete account" accessible"

parent 15622255
Branches
No related merge requests found
...@@ -4,6 +4,8 @@ import { RoomEditComponent } from '../../../creator/_dialogs/room-edit/room-edit ...@@ -4,6 +4,8 @@ import { RoomEditComponent } from '../../../creator/_dialogs/room-edit/room-edit
import { RoomService } from '../../../../services/http/room.service'; import { RoomService } from '../../../../services/http/room.service';
import { Room } from '../../../../models/room'; import { Room } from '../../../../models/room';
import { DialogConfirmActionButtonType } from '../../dialog/dialog-action-buttons/dialog-action-buttons.component'; import { DialogConfirmActionButtonType } from '../../dialog/dialog-action-buttons/dialog-action-buttons.component';
import { LiveAnnouncer } from '@angular/cdk/a11y';
import { TranslateService } from '@ngx-translate/core';
@Component({ @Component({
selector: 'app-delete-account', selector: 'app-delete-account',
...@@ -23,9 +25,12 @@ export class DeleteAccountComponent implements OnInit { ...@@ -23,9 +25,12 @@ export class DeleteAccountComponent implements OnInit {
constructor(public dialogRef: MatDialogRef<RoomEditComponent>, constructor(public dialogRef: MatDialogRef<RoomEditComponent>,
@Inject(MAT_DIALOG_DATA) public data: any, @Inject(MAT_DIALOG_DATA) public data: any,
private roomService: RoomService) { } private roomService: RoomService,
private liveAnnouncer: LiveAnnouncer,
private translationService: TranslateService, ) { }
ngOnInit() { ngOnInit() {
this.announce();
this.roomService.getCreatorRooms().subscribe(rooms => { this.roomService.getCreatorRooms().subscribe(rooms => {
this.rooms = rooms.sort((a, b) => { this.rooms = rooms.sort((a, b) => {
return a.name > b.name ? 1 : -1; return a.name > b.name ? 1 : -1;
...@@ -33,6 +38,21 @@ export class DeleteAccountComponent implements OnInit { ...@@ -33,6 +38,21 @@ export class DeleteAccountComponent implements OnInit {
}); });
} }
public announce() {
const lang: string = this.translationService.currentLang;
// current live announcer content must be cleared before next read
this.liveAnnouncer.clear();
if (lang === 'de') {
this.liveAnnouncer.announce('Willst du dein Konto mit allen Sitzungen unwiderruflich löschen?', 'assertive');
} else {
this.liveAnnouncer.announce('Do you really want to irrevocably delete your account with the associated sessions?', 'assertive');
}
}
close(type: string): void { close(type: string): void {
this.dialogRef.close(type); this.dialogRef.close(type);
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment