Constructor: H1Element

OpenAjax.a11y.cache.H1Element

new H1Element(dom_element, parent_landmark, main_landmark)

Creates a h1 heading element object used to hold information about a h1 heading elements used for titling

Parameters:
Name Type Description
dom_element DOMelement The dom element object representing the heading element
parent_landmark LandmarkElement Information about the parent landmark (NOTE: can be null)
main_landmark MainElement Information about the parent main landmark (NOTE: can be null)
Properties:
Name Type Description
dom_element DOMElement Reference to the dom element representing the optgroup element
cache_id String String that uniquely identifies the cache element object in the cache
document_order Number Ordinal position of the title and main cache items in the document to other title and main cache items
parent_landmark LandmarkElement Information about the parent landmark (NOTE: can be null)
main_landmark MainElement Information about the parent main landmark (NOTE: can be null)
child_cache_elements Array List of child cache title element, main landmarks and h1 heading element objects as part of cache title and main elements tree
type Number Constant representing the type of main landmark
is_label_for_main Boolean true if h1 is being used as a label for main landmark, otherwise false
is_child_of_main Boolean true if h1 is the child of the main landmark it is a label for, otherwise false
name String Calculated accessible name of the heading
name_length Number Length of accessible name
name_for_comparison String Accessible name for comparison (i.e. lowercase, trimmed and space normalized)
Source:
  • scripts/cache_headings_landmarks.js, line 1600

Methods

<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_headings_landmarks.js, line 1710
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_headings_landmarks.js, line 1734
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_headings_landmarks.js, line 1767
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_headings_landmarks.js, line 1788
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_headings_landmarks.js, line 1680
Returns:
Returns a array of node results
Type
Array

<static> getStyle() → {Array}

Returns an array of style items

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

<static> isH1UsedAsLabelForMainRole() → {Boolean}

Determines if an H1 element is being used as a label for a main Role

Source:
  • scripts/cache_headings_landmarks.js, line 1653
Returns:
True if the h1 element is being used as a label for the main landmark it is contained in, otherwise false
Type
Boolean

<static> toString() → {String}

Returns a text string representation of the h1 heading element

Source:
  • scripts/cache_headings_landmarks.js, line 1805
Returns:
Returns string represention the h1 heading element object
Type
String