source: trip-planner-front/node_modules/@angular/cdk/a11y/live-announcer/live-announcer.d.ts@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.8 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { ContentObserver } from '@angular/cdk/observers';
9import { ElementRef, NgZone, OnDestroy } from '@angular/core';
10import { AriaLivePoliteness, LiveAnnouncerDefaultOptions } from './live-announcer-tokens';
11import * as ɵngcc0 from '@angular/core';
12export declare class LiveAnnouncer implements OnDestroy {
13 private _ngZone;
14 private _defaultOptions?;
15 private _liveElement;
16 private _document;
17 private _previousTimeout;
18 constructor(elementToken: any, _ngZone: NgZone, _document: any, _defaultOptions?: LiveAnnouncerDefaultOptions | undefined);
19 /**
20 * Announces a message to screenreaders.
21 * @param message Message to be announced to the screenreader.
22 * @returns Promise that will be resolved when the message is added to the DOM.
23 */
24 announce(message: string): Promise<void>;
25 /**
26 * Announces a message to screenreaders.
27 * @param message Message to be announced to the screenreader.
28 * @param politeness The politeness of the announcer element.
29 * @returns Promise that will be resolved when the message is added to the DOM.
30 */
31 announce(message: string, politeness?: AriaLivePoliteness): Promise<void>;
32 /**
33 * Announces a message to screenreaders.
34 * @param message Message to be announced to the screenreader.
35 * @param duration Time in milliseconds after which to clear out the announcer element. Note
36 * that this takes effect after the message has been added to the DOM, which can be up to
37 * 100ms after `announce` has been called.
38 * @returns Promise that will be resolved when the message is added to the DOM.
39 */
40 announce(message: string, duration?: number): Promise<void>;
41 /**
42 * Announces a message to screenreaders.
43 * @param message Message to be announced to the screenreader.
44 * @param politeness The politeness of the announcer element.
45 * @param duration Time in milliseconds after which to clear out the announcer element. Note
46 * that this takes effect after the message has been added to the DOM, which can be up to
47 * 100ms after `announce` has been called.
48 * @returns Promise that will be resolved when the message is added to the DOM.
49 */
50 announce(message: string, politeness?: AriaLivePoliteness, duration?: number): Promise<void>;
51 /**
52 * Clears the current text from the announcer element. Can be used to prevent
53 * screen readers from reading the text out again while the user is going
54 * through the page landmarks.
55 */
56 clear(): void;
57 ngOnDestroy(): void;
58 private _createLiveElement;
59 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<LiveAnnouncer, [{ optional: true; }, null, null, { optional: true; }]>;
60}
61/**
62 * A directive that works similarly to aria-live, but uses the LiveAnnouncer to ensure compatibility
63 * with a wider range of browsers and screen readers.
64 */
65export declare class CdkAriaLive implements OnDestroy {
66 private _elementRef;
67 private _liveAnnouncer;
68 private _contentObserver;
69 private _ngZone;
70 /** The aria-live politeness level to use when announcing messages. */
71 get politeness(): AriaLivePoliteness;
72 set politeness(value: AriaLivePoliteness);
73 private _politeness;
74 private _previousAnnouncedText?;
75 private _subscription;
76 constructor(_elementRef: ElementRef, _liveAnnouncer: LiveAnnouncer, _contentObserver: ContentObserver, _ngZone: NgZone);
77 ngOnDestroy(): void;
78 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkAriaLive, never>;
79 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkAriaLive, "[cdkAriaLive]", ["cdkAriaLive"], { "politeness": "cdkAriaLive"; }, {}, never>;
80}
81
82//# sourceMappingURL=live-announcer.d.ts.map
Note: See TracBrowser for help on using the repository browser.