com.extjs.gxt.ui.client.widget
Class AriaSupport

java.lang.Object
  extended by com.extjs.gxt.ui.client.widget.AriaSupport

public class AriaSupport
extends java.lang.Object

ARIA component support.


Method Summary
 java.lang.String getDescribedBy()
          Returns the ARIA described by id.
 java.lang.String getDescription()
          Returns the description.
 java.lang.String getLabel()
          Returns the ARIA label text.
 java.lang.String getLabelledBy()
          Returns the ARIA labelled by id.
 java.lang.String getRole()
          Returns the ARIA role.
 java.lang.String getState(java.lang.String stateName)
          Returns the ARIA state.
 java.util.Map<java.lang.String,java.lang.String> getStates()
          Returns the ARIA states.
 boolean isPresentation()
          Returns true if the component is a presentation element.
 void setDescribedBy(java.lang.String describedBy)
          Sets the ARIA described by attribute on the component.
 void setDescription(java.lang.String description)
          Sets the ARIA description.
 void setLabel(java.lang.String label)
          Sets the ARIA label attribute on the component.
 void setLabelledBy(java.lang.String labelledBy)
          Sets the ARIA labelled by attribute on the component.
 void setPresentation(boolean presentation)
          True to mark this component as a ARIA presentation element.
 void setRole(java.lang.String role)
          Sets the ARIA role.
 void setState(java.lang.String stateName, java.lang.String value)
          Sets the ARIA state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDescribedBy

public java.lang.String getDescribedBy()
Returns the ARIA described by id.

Returns:
the ARIA described by id

getDescription

public java.lang.String getDescription()
Returns the description.

Returns:
the description

getLabel

public java.lang.String getLabel()
Returns the ARIA label text.

Returns:
the ARIA label text

getLabelledBy

public java.lang.String getLabelledBy()
Returns the ARIA labelled by id.

Returns:
the ARIA labelled by id.

getRole

public java.lang.String getRole()
Returns the ARIA role.

Returns:
the ARIA role

getState

public java.lang.String getState(java.lang.String stateName)
Returns the ARIA state.

Parameters:
stateName - the state name
Returns:
the state value

getStates

public java.util.Map<java.lang.String,java.lang.String> getStates()
Returns the ARIA states.

Returns:
the ARIA states

isPresentation

public boolean isPresentation()
Returns true if the component is a presentation element.

Returns:
true for presentation

setDescribedBy

public void setDescribedBy(java.lang.String describedBy)
Sets the ARIA described by attribute on the component.

Parameters:
describedBy - the id of the element with the label

setDescription

public void setDescription(java.lang.String description)
Sets the ARIA description. This method creates a hidden div, assigns it an id and then sets the aria-describedby value. Should not be called if setDescribedBy(String) is used. This method is useful when there is not an existing element to be used for the description.

Parameters:
description - the description

setLabel

public void setLabel(java.lang.String label)
Sets the ARIA label attribute on the component.

Parameters:
label - the label

setLabelledBy

public void setLabelledBy(java.lang.String labelledBy)
Sets the ARIA labelled by attribute on the component.

Parameters:
labelledBy - the id of the element with the label

setPresentation

public void setPresentation(boolean presentation)
True to mark this component as a ARIA presentation element.

Parameters:
presentation - true for presentation

setRole

public void setRole(java.lang.String role)
Sets the ARIA role.

Parameters:
role - the ARIA role

setState

public void setState(java.lang.String stateName,
                     java.lang.String value)
Sets the ARIA state.

Parameters:
stateName - the state name
value - the state value