118220: Add additional TypeDocs

This commit is contained in:
Andreas Awouters
2024-09-27 10:02:26 +02:00
parent c1fa52ee64
commit 751d689ff6
2 changed files with 10 additions and 1 deletions

View File

@@ -2,6 +2,12 @@ import { Component, OnInit } from '@angular/core';
import { LiveRegionService } from './live-region.service';
import { Observable } from 'rxjs';
/**
* The Live Region Component is an accessibility tool for screenreaders. When a change occurs on a page when the changed
* section is not in focus, a message should be displayed by this component so it can be announced by a screen reader.
*
* This component should not be used directly. Use the {@link LiveRegionService} to add messages.
*/
@Component({
selector: `ds-live-region`,
templateUrl: './live-region.component.html',

View File

@@ -3,6 +3,10 @@ import { BehaviorSubject } from 'rxjs';
import { environment } from '../../../environments/environment';
import { UUIDService } from '../../core/shared/uuid.service';
/**
* The LiveRegionService is responsible for handling the messages that are shown by the {@link LiveRegionComponent}.
* Use this service to add or remove messages to the Live Region.
*/
@Injectable({
providedIn: 'root',
})
@@ -76,7 +80,6 @@ export class LiveRegionService {
/**
* Removes the message with the given UUID from the messages array
* @param uuid The uuid of the message to clear
* @protected
*/
clearMessageByUUID(uuid: string) {
const index = this.messages.findIndex(messageObj => messageObj.uuid === uuid);