com.vaadin.polymer.iron.element.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.element;
import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.js.JsProperty;
import com.google.gwt.core.client.js.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 singlton 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
public interface IronA11yAnnouncerElement extends HTMLElement {
public static final String TAG = "iron-a11y-announcer";
public static final String SRC = "iron-a11y-announcer/iron-a11y-announcer.html";
/**
* Cause a text string to be announced by screen readers.
*
* JavaScript Info:
* @method announce
* @param {string} text
*
*/
void announce(String text);
/**
* 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);
}