Constructor: DOMText

OpenAjax.a11y.cache.DOMText

new DOMText(node, parent_element)

DOMText object represents DOM nodes of type text

Parameters:
Name Type Description
node Object The DOM text node
parent_element DOMElement DOMElement object that is the current parent in the tree
Properties:
Name Type Description
parent_landmark DOMElement LandmarkElement object that contains this element
parent_landmark LandmarkElement LandmarkElement object that contains the text content
type Number Type of DOM node element or text
text String Text content of DOM text node
text_normalized String Normalized text in the node
text_length Number length of the normalized text in the node
cache_id String String that uniquely identifies the cache element in the DOMCache
document_order Number The ordinal position of this DOM text node in the DOM
computed_style Object Object that contains information about run time styling of the node
events Object Object that contains information about event handlers attached to the node and its descendents
has_rule_results Boolean Boolean indicating if the node has any rule results
rules_violations Array Array of NodeResult objects with severity of 'Violation'
rules_manual_checks Array Array of NodeResult objects with severity of 'Manual Check'
rules_warnings Array Array of NodeResult objects with severity of 'Warning'
rules_passed Array Array of NodeResult objects with severity of 'Passed'
rules_hidden Array Array of NodeResult objects with severity of 'Hidden'
Source:
  • scripts/cache_dom_element.js, line 387

Methods

<static> addText(text) → {Number}

Check DOMElement for presence of attribute with specified value

Parameters:
Name Type Description
text String text content to add
Source:
  • scripts/cache_dom_element.js, line 448
Returns:
Length of the normailized text content of the DOM text node
Type
Number

<static> getAccessibility() → {Object}

Returns the worst severity level of rule results

Source:
  • scripts/cache_dom_element.js, line 559
Returns:
Results an object wiith two properties: 'severity' : nls value of the severity, 'style' : a severity styling constant
Type
Object

<static> getAttributes() → {Array}

Returns an empty array, text nodes do not have attributes

Source:
  • scripts/cache_dom_element.js, line 604
Returns:
Returns a empty array
Type
Array

<static> getCacheProperties() → {Array}

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

Source:
  • scripts/cache_dom_element.js, line 637
Returns:
Returns a array of NLS objects for styling
Type
Array

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

Returns the value of a property

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

<static> getClassName() → {String}

If defined, return the class attribute value of the dom node containing this text

Source:
  • scripts/cache_dom_element.js, line 492
Returns:
If defined return class value value, else empty string
Type
String

<static> getColorContrastNodeResult() → {Object}

Returns a node result for a color contrast rule

Source:
  • scripts/cache_dom_element.js, line 750
Returns:
Returns node result object of a color contrast rule
Type
Object

<static> getEvents() → {Array}

Returns an empty array, text nodes do not have events

Source:
  • scripts/cache_dom_element.js, line 620
Returns:
Returns a empty array
Type
Array

<static> getId() → {String}

If defined, return the id of the dom node containing this text

Source:
  • scripts/cache_dom_element.js, line 476
Returns:
If defined return id value, else empty string
Type
String

<static> getNodeResults() → {Array}

Returns an array of node results in severity order

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

<static> getParentLandmark() → {String}

If defined, return the parent landmark element information

Source:
  • scripts/cache_dom_element.js, line 508
Returns:
If defined return class value value, else empty string
Type
String

<static> getStyle() → {Array}

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

Source:
  • scripts/cache_dom_element.js, line 663
Returns:
Returns a array of NLS objects for styling
Type
Array

<static> getText() → {String}

Returns text content of a DOMText element

Source:
  • scripts/cache_dom_element.js, line 802
Returns:
Returns the text content dom text node
Type
String

<static> toString() → {String}

Returns text representation of a DOMText element

Source:
  • scripts/cache_dom_element.js, line 816
Returns:
Returns a string representing the DOM text node
Type
String