Skip to content

Commit 751d689

Browse files
committed
118220: Add additional TypeDocs
1 parent c1fa52e commit 751d689

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/app/shared/live-region/live-region.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import { Component, OnInit } from '@angular/core';
22
import { LiveRegionService } from './live-region.service';
33
import { Observable } from 'rxjs';
44

5+
/**
6+
* The Live Region Component is an accessibility tool for screenreaders. When a change occurs on a page when the changed
7+
* section is not in focus, a message should be displayed by this component so it can be announced by a screen reader.
8+
*
9+
* This component should not be used directly. Use the {@link LiveRegionService} to add messages.
10+
*/
511
@Component({
612
selector: `ds-live-region`,
713
templateUrl: './live-region.component.html',

src/app/shared/live-region/live-region.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import { BehaviorSubject } from 'rxjs';
33
import { environment } from '../../../environments/environment';
44
import { UUIDService } from '../../core/shared/uuid.service';
55

6+
/**
7+
* The LiveRegionService is responsible for handling the messages that are shown by the {@link LiveRegionComponent}.
8+
* Use this service to add or remove messages to the Live Region.
9+
*/
610
@Injectable({
711
providedIn: 'root',
812
})
@@ -76,7 +80,6 @@ export class LiveRegionService {
7680
/**
7781
* Removes the message with the given UUID from the messages array
7882
* @param uuid The uuid of the message to clear
79-
* @protected
8083
*/
8184
clearMessageByUUID(uuid: string) {
8285
const index = this.messages.findIndex(messageObj => messageObj.uuid === uuid);

0 commit comments

Comments
 (0)