mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
118220: Add additional TypeDocs
This commit is contained in:
@@ -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',
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user