Constructor: WidgetElement

OpenAjax.a11y.cache.WidgetElement

new WidgetElement(dom_element, control_info)

Creates a InputElement object used to hold information about input elements

Parameters:
Name Type Description
dom_element DOMelement The dom element object representing the input element
control_info ControlInfo Information about the parent controls
Properties:
Name Type Description
dom_element DOMElement Reference to the dom element representing the input element
cache_id String String that uniquely identifies the cache element object in the cache
document_order Number Ordinal position of the control element in the document in relationship to other control elements
has_owns Boolean if the widget has aria-owns, use this to calculate children
child_cache_elements Array Array of child cache control elements as part of cache control tree
type String String indicating the type of input element
control_type Number Constant indicating the type of cache control object
name_attribute String Text content of the name attribute
computed_label String Calculated label for the input element
computed_label_length Number Length of the label property
computed_label_source Number Constant representing how a label was calculated
computed_label_for_comparison String Label for comparison (lowercase, space normalization and trimmed)
label_element LabelElement Reference to any label element that this input is nested in
fieldset_element FieldsetElement Reference to any fieldset elements this input is nested in
readonly String The value of the readonly attribute
disabled String The value of the disabled attribute
value String The value of the readonly attribute
checked String The value of the disabled attribute
is_owned Boolean True if this widget is owned by another widget
owner_controls Array Array of all the widgets that own this widget (NOTE: More than one owner is an error)
Source:
  • scripts/cache_controls.js, line 3671

Methods

<static> addChildControl(control_element, override_owns)

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

Parameters:
Name Type Description
control_element WidegtElement | ButtonElement | FieldsetElement | FormElement | InputElement | LabelElement | LegendElement | OptgroupElement | OptionElement | SelectElement | TextareaElement Cache control element object to add
override_owns Boolean If true, allow child elements to be added if the widget has an owns property
Source:
  • scripts/cache_controls.js, line 3741

<static> addOwnerControl(owner_control)

Adds a ARIA owner control element reference

Parameters:
Name Type Description
owner_control WidegtElement Cache control element object to add
Source:
  • scripts/cache_controls.js, line 2233

<static> addOwnerControl(owner_control)

Adds a ARIA owner control element reference

Parameters:
Name Type Description
owner_control WidegtElement Cache control element object to add
Source:
  • scripts/cache_controls.js, line 2503

<static> addOwnerControl(owner_control)

Adds a ARIA owner control element reference

Parameters:
Name Type Description
owner_control WidegtElement Cache control element object to add
Source:
  • scripts/cache_controls.js, line 2791

<static> addOwnerControl(owner_control)

Adds a ARIA owner control element reference

Parameters:
Name Type Description
owner_control WidegtElement Cache control element object to add
Source:
  • scripts/cache_controls.js, line 3265

<static> addOwnerControl(owner_control)

Adds a ARIA owner control element reference

Parameters:
Name Type Description
owner_control WidegtElement Cache control element object to add
Source:
  • scripts/cache_controls.js, line 3761

<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 3909
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 3939
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 3970
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 3992
Returns:
Returns a array of event item display objects
Type
Array

<static> getLabelNLS() → {String|Object}

Returns an object with an NLS localized string and style properties If label is empty a missing label message will the returned

Source:
  • scripts/cache_controls.js, line 4009
Returns:
Returns a String if the label has content, but if label is empty it returns an object with a 'label and 'style' property
Type
String | Object

<static> getLabelSourceNLS() → {String|Object}

Returns an object with an NLS localized information on the source of the label

Source:
  • scripts/cache_controls.js, line 4037
Returns:
Returns a String if the label has content, but if label is empty it returns an object with a 'label and 'style' property
Type
String | Object

<static> getNodeResults() → {Array}

Returns an array of node results in severity order

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

<static> getOwnedIds() → {Array}

Returns an array of strings representing the ids in the aria-owns property

Source:
  • scripts/cache_controls.js, line 3780
Returns:
Returns an array of string objects represrenting the ids of the aria-owns property
Type
Array

<static> getStyle() → {Array}

Returns an array of style items

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

<static> hasChildRole(role) → {Boolean}

Tests if a widget has a child ARIA element with a certain role

Parameters:
Name Type Description
role String Role to find
Source:
  • scripts/cache_controls.js, line 3810
Returns:
Returns true if widget has child element with role, otherwise false
Type
Boolean

<static> hasParentRole(role) → {Boolean}

Tests if a widget has a parent element with a certain role

Parameters:
Name Type Description
role String Role to find
Source:
  • scripts/cache_controls.js, line 3851
Returns:
Returns true if widget has child element with role, otherwise false
Type
Boolean

<static> toString() → {String}

Returns a text string representation of the input element

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