Package com.vaadin.flow.component
Interface HasAriaRole
- All Superinterfaces:
HasElement,Serializable
A generic interface for components and other user interface objects that may
have a role DOM attribute to define the semantic meaning of the component for
assistive technologies such as screen readers.
The default implementation sets the role of the component to the given
HasElement.getElement(). Override the methods in this interface if the role
should be added to some other element.
See: https://www.w3.org/TR/wai-aria/#usage_intro
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionGets the ARIA role attribute of the component.default voidsetAriaRole(String role) Sets the ARIA role attribute of the component to the given role.Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Method Details
-
setAriaRole
Sets the ARIA role attribute of the component to the given role.- Parameters:
role- the role to set, ornullto clear
-
getAriaRole
Gets the ARIA role attribute of the component.- Returns:
- an optional ARIA role of the component if no ARIA role has been set
-