All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fluorumlabs.disconnect.polymer.IronA11yAnnouncer Maven / Gradle / Ivy

There is a newer version: 0.1.0-alpha2
Show newest version
package com.github.fluorumlabs.disconnect.polymer;

import com.github.fluorumlabs.disconnect.core.annotations.WebComponent;
import com.github.fluorumlabs.disconnect.polymer.elements.IronA11yAnnouncerElement;
import com.github.fluorumlabs.disconnect.zero.component.AbstractComponent;

import javax.annotation.Nullable;

/**
 * The type Iron a 11 y announcer.
 */
@WebComponent
public class IronA11yAnnouncer
		extends AbstractComponent {
	/**
	 * Instantiates a new Iron a 11 y announcer.
	 */
	public IronA11yAnnouncer() {
		super(IronA11yAnnouncerElement.TAGNAME());
	}

	/**
	 * 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.
	 *
	 * @return the string
	 */
	@Nullable
	public String mode() {
		return getNode().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.
	 *
	 * @param mode the mode
	 *
	 * @return the iron a 11 y announcer
	 */
	public IronA11yAnnouncer mode(String mode) {
		getNode().setMode(mode);
		return this;
	}

	/**
	 * Cause a text string to be announced by screen readers.
	 *
	 * @param text The text that should be announced.
	 */
	public void announce(String text) {
		getNode().announce(text);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy