com.vaadin.polymer.iron.IronA11yAnnouncerElement Maven / Gradle / Ivy
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from iron-a11y-announcer project by The Polymer Authors
* that is licensed with http://polymer.github.io/LICENSE.txt license.
*/
package com.vaadin.polymer.iron;
import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
/**
* iron-a11y-announcer
is a singleton element that is intended to add a11y
to features that require on-demand announcement from screen readers. In
order to make use of the announcer, it is best to request its availability
in the announcing element.
* Example:
* Polymer({
*
* is: 'x-chatty',
*
* attached: function() {
* // This will create the singleton element if it has not
* // been created yet:
* Polymer.IronA11yAnnouncer.requestAvailability();
* }
* });
*
*
*
After the iron-a11y-announcer
has been made available, elements can
make announces by firing bubbling iron-announce
events.
* Example:
* this.fire('iron-announce', {
* text: 'This is an announcement!'
* }, { bubbles: true });
*
*
*
Note: announcements are only audible if you have a screen reader enabled.
*/
@JsType(isNative=true)
public interface IronA11yAnnouncerElement extends HTMLElement {
@JsOverlay public static final String TAG = "iron-a11y-announcer";
@JsOverlay public static final String SRC = "iron-a11y-announcer/iron-a11y-announcer.html";
/**
* The value of mode is used to set the aria-live
attribute
for the element that will be announced. Valid values are: off
,
polite
and assertive
.
*
* JavaScript Info:
* @property mode
* @type String
*
*/
@JsProperty String getMode();
/**
* The value of mode is used to set the aria-live
attribute
for the element that will be announced. Valid values are: off
,
polite
and assertive
.
*
* JavaScript Info:
* @property mode
* @type String
*
*/
@JsProperty void setMode(String value);
/**
* Cause a text string to be announced by screen readers.
*
* JavaScript Info:
* @method announce
* @param {string} text
*
*
*/
void announce(String text);
}