API Reference 0.3.24dart_web_toolkit_roleAriaValueAttribute<T>

AriaValueAttribute<T extends AriaAttributeType> class

ARIA specific type attribute.

class AriaValueAttribute<T extends AriaAttributeType> extends Attribute<T> {

 AriaValueAttribute(String name, [String defaultValue = null]) : super(name, defaultValue);

 String getSingleValue(T value) {
   return value.getAriaValue();
 }
}

Extends

Attribute<T> > AriaValueAttribute<T>

Constructors

new AriaValueAttribute(String name, [String defaultValue = null]) #

Constructs a state/property ARIA attribute with name {@code name} and {@code defaultValue}.

@param name State/Property name @param defaultValue Default values

docs inherited from Attribute<T>
AriaValueAttribute(String name, [String defaultValue = null]) : super(name, defaultValue);

Properties

String defaultValue #

inherited from Attribute
String defaultValue

final String name #

inherited from Attribute
final String name

Methods

String get(Element element) #

inherited from Attribute

Gets the HTML attribute value for the attribute with name {@code name} for element {@code element}

@param element HTM element @return The attribute value for {@code element}

String get(dart_html.Element element) {
 assert (element != null); // : "Element cannot be null.";
 return element.attributes["name"];
}

String getName() #

inherited from Attribute

Gets the property/state name

@return The attribute name

String getName() {
 return name;
}

String getSingleValue(T value) #

String getSingleValue(T value) {
 return value.getAriaValue();
}

void remove(Element element) #

inherited from Attribute

Removes the state/property attribute for element {@code element}.

@param element HTM element

void remove(dart_html.Element element) {
 assert (element != null); // : "Element cannot be null.";
 element.attributes.remove(name);
}

void set(Element element, T values) #

inherited from Attribute

Sets the state/property {@code value} for the HTML element {@code element}.

@param element HTML element @param values Attribute value

void set(dart_html.Element element, T values) {
 assert (element != null); // : "Element cannot be null.";
 //assert (values.length > 0);
 element.attributes[name] = _getAriaValue(values);
}

void setDefault(Element element) #

inherited from Attribute

Sets the state/property value to the defaultValue if not null. If a list of default values is set, every default value is converted to string and the string values are concatenated in a string token list. There is an assertion checking whether the default is null. Note that the asserts are enabled during development and testing but they will be stripped in production mode.

@param element HTML element

void setDefault(dart_html.Element element) {
 assert (element != null); // : "Element cannot be null.";
 assert (defaultValue != null && !defaultValue.isEmpty); // : "Default value cannot be null.";
 element.attributes[name] = defaultValue;
}