mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +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 { LiveRegionService } from './live-region.service';
|
||||||
import { Observable } from 'rxjs';
|
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({
|
@Component({
|
||||||
selector: `ds-live-region`,
|
selector: `ds-live-region`,
|
||||||
templateUrl: './live-region.component.html',
|
templateUrl: './live-region.component.html',
|
||||||
|
@@ -3,6 +3,10 @@ import { BehaviorSubject } from 'rxjs';
|
|||||||
import { environment } from '../../../environments/environment';
|
import { environment } from '../../../environments/environment';
|
||||||
import { UUIDService } from '../../core/shared/uuid.service';
|
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({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
@@ -76,7 +80,6 @@ export class LiveRegionService {
|
|||||||
/**
|
/**
|
||||||
* Removes the message with the given UUID from the messages array
|
* Removes the message with the given UUID from the messages array
|
||||||
* @param uuid The uuid of the message to clear
|
* @param uuid The uuid of the message to clear
|
||||||
* @protected
|
|
||||||
*/
|
*/
|
||||||
clearMessageByUUID(uuid: string) {
|
clearMessageByUUID(uuid: string) {
|
||||||
const index = this.messages.findIndex(messageObj => messageObj.uuid === uuid);
|
const index = this.messages.findIndex(messageObj => messageObj.uuid === uuid);
|
||||||
|
Reference in New Issue
Block a user