Constructor: LabelElement

OpenAjax.a11y.cache.LabelElement

new LabelElement(dom_element, control_info)

Creates a LabelElement object used to hold information about label elements

Parameters:
Name Type Description
dom_element DOMelement The dom element object representing the label element
control_info ControlInfo Information about the parent controls
Properties:
Name Type Description
dom_element DOMElement Reference to the dom element representing the label element
cache_id String String that uniquely identifies the cache element object in the cache
document_order Number Ordinal position of the label element in the document in relationship to other label elements
child_cache_elements Array Array of child cache control elements as part of cache control tree
control_type Number Constant indicating the type of cache control object
computed_label String Text content of the label element
computed_label_len Number Length of the computed label
computed_label_for_comparison String Label for comparison (lowercase, space normalization and trimmed)
unused_label Boolean Boolean indicting where the label references a form control
control_element Object Reference to the control that the label elements is associated with
fieldset_element FieldsetElement Reference to any fieldset elements this label is nested in
Source:
  • scripts/cache_controls.js, line 1908

Methods

<static> addChildControl(control_element)

Adds a cache control element to the tree representation of control elements

Parameters:
Name Type Description
control_element WidgetElement | ButtonElement | FieldsetElement | FormElement | InputElement | LabelElement | LegendElement | OptgroupElement | OptionElement | SelectElement | TextareaElement Cache control element object to add
Source:
  • scripts/cache_controls.js, line 1959

<static> getAttributes(unsorted) → {Array}

Returns an array of attributes for the element, sorted in alphabetical order

Parameters:
Name Type Description
unsorted Boolean If defined and true the results will NOT be sorted alphabetically
Source:
  • scripts/cache_controls.js, line 2007
Returns:
Returns a array of attribute display object
Type
Array

<static> getCacheProperties(unsorted) → {Array}

Returns an array of cache properties sorted by property name

Parameters:
Name Type Description
unsorted Boolean If defined and true the results will NOT be sorted alphabetically
Source:
  • scripts/cache_controls.js, line 2031
Returns:
Returns a array of cache property display object
Type
Array

<static> getCachePropertyValue(property) → {String|Number}

Returns the value of a property

Parameters:
Name Type Description
property String The property to retreive the value
Source:
  • scripts/cache_controls.js, line 2060
Returns:
Returns the value of the property
Type
String | Number

<static> getEvents() → {Array}

Returns an array of events for the element, sorted in alphabetical order

Source:
  • scripts/cache_controls.js, line 2081
Returns:
Returns a array of event item display objects
Type
Array

<static> getNodeResults() → {Array}

Returns an array of node results in severity order

Source:
  • scripts/cache_controls.js, line 1977
Returns:
Returns a array of node results
Type
Array

<static> getStyle() → {Array}

Returns an array of style items

Source:
  • scripts/cache_controls.js, line 1991
Returns:
Returns a array of style display objects
Type
Array

<static> toString() → {String}

Returns a text string representation of the label element

Source:
  • scripts/cache_controls.js, line 2096
Returns:
Returns string represention the LabelElement object
Type
String