new LandmarkElement(dom_element, parent_landmark)
Creates a landmark element object used to hold information about a landmark
Parameters:
Name | Type | Description |
---|---|---|
dom_element |
DOMelement | The dom element object representing the landmark element |
parent_landmark |
LandmarkElement | Information about the parent landmark (NOTE: can be null) |
- Source:
- scripts/cache_headings_landmarks.js, line 784
Properties:
Name | Type | Description |
---|---|---|
dom_element |
DOMElement | Reference to the dom element representing the landmark element |
cache_id |
String | String that uniquely identifies the cache element object in the cache |
document_order |
Number | Ordinal position of the landmark element in the document in relationship to other landmark elements |
role |
String | String representing the type of landmark |
child_cache_elements |
Array | Array of child cache landmark and heading element objects as part of cache landmark and header tree |
label |
String | Accessible label of the landmark |
label_length |
Number | Length of label text |
label_source |
Number | Constant representing the source of the label (i.e. aria-label, aria-labelledby, title...) |
label_for_comparison |
String | Accessible label for comparison (i.e. lowercase, trimmed and space normalized) |
Methods
-
<static> addChildElement(child_element)
-
Adds a LandmarkElement or HeaderElement object to the tree of landmark/heading elements
Parameters:
Name Type Description child_element
LandmarkElement | HeadingElement Landmark element or heading element object to add - Source:
- scripts/cache_headings_landmarks.js, line 828
-
<static> addToElementCount(n)
-
Adds N elements to the count of elements with content
Parameters:
Name Type Description n
Number Number of elements to add to count - Source:
- scripts/cache_headings_landmarks.js, line 861
-
<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 953
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 977
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 1007
Returns:
Returns the value of the property- Type
- String | Number
-
<static> getElementsWithContentCount() → {Number}
-
Get the number of child elements with content, inlcuding the elements with content of child landmark elements
- Source:
- scripts/cache_headings_landmarks.js, line 878
Returns:
Number of elements with content- Type
- Number
-
<static> getEvents() → {Array}
-
Returns an array of events for the element, sorted in alphabetical order
- Source:
- scripts/cache_headings_landmarks.js, line 1029
Returns:
Returns a array of event item display objects- Type
- Array
-
<static> getHeadings() → {Array}
-
Get all the heading elements in a landmark
- Source:
- scripts/cache_headings_landmarks.js, line 908
Returns:
Array of heading elements- Type
- Array
-
<static> getNodeResults() → {Array}
-
Returns an array of node results in severity order
- Source:
- scripts/cache_headings_landmarks.js, line 847
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 937
Returns:
Returns a array of style display objects- Type
- Array
-
<static> toString() → {String}
-
Returns a text string representation of the landmark element
- Source:
- scripts/cache_headings_landmarks.js, line 1046
Returns:
Returns string represention the landmark element object- Type
- String