MOBILE-3833 editor: Fix RTE label

main
Noel De Martin 2022-03-23 09:10:44 +01:00
parent 790dfdfe82
commit 0144791242
1 changed files with 5 additions and 1 deletions

View File

@ -215,8 +215,12 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterViewInit,
return;
}
this.labelObserver = new MutationObserver(() => this.ariaLabelledBy = label.getAttribute('id') ?? undefined);
const updateArialabelledBy = () => this.ariaLabelledBy = label.getAttribute('id') ?? undefined;
this.labelObserver = new MutationObserver(updateArialabelledBy);
this.labelObserver.observe(label, { attributes: true, attributeFilter: ['id'] });
updateArialabelledBy();
}
/**