Constructor: TablesCache

OpenAjax.a11y.cache.TablesCache

new TablesCache(dom_cache)

Create a table cache object to hold information about tables in a web page

Parameters:
Name Type Description
dom_cache DOMCache Reference to the DOMCache object
Properties:
Name Type Description
dom_cache DOMCache Reference to the DOMCache object
up_to_date Boolean true if the cache has been creating using the current DOMElements, else false NOTE: This is a common property of all caches and is used when selectively build caches based on whether a rule needs the cache
child_cache_elements Array Root array of the tree representation of the table elements in the document
table_elements Array Array of all the TableElement objects in the cache
length Number Running length of the table_elements array for use in calculating cache_id values
rule_results Array Root array of the tree representation of the table elements in the document
rule_summary_result ResultRuleSummary Rule results associated with this cache
Source:
  • scripts/cache_tables.js, line 57

Methods

getTableElementByCacheId(cache_id) → {TableElement|CaptionElement|THeadElement|TBodyElement|TableRowElement|TableCellElement|null}

Finds the the table cache element object with the matching cache id

Parameters:
Name Type Description
cache_id String Cache id of table cache element object
Deprecated:
  • getTableElementByCacheId
    Source:
    • scripts/cache_tables.js, line 167
    Returns:
    Returns cache table element object if cache id is found, otherwise null
    Type
    TableElement | CaptionElement | THeadElement | TBodyElement | TableRowElement | TableCellElement | null

    <static> addChild(table_element)

    Adds a cache table element to the tree representation of the table in the table cache

    Parameters:
    Name Type Description
    table_element TableElement | CaptionElement | THeadElement | TBodyElement | TableRowElement | TableCellElement Cache table element object to add to root of tree of table elements
    Source:
    • scripts/cache_tables.js, line 123

    <static> addRuleResult(rule_result)

    Add a RuleResult reference to the table cache

    Parameters:
    Name Type Description
    rule_result RuleResult Rule result to associate with the table cache
    Source:
    • scripts/cache_tables.js, line 140

    <static> addTableElement(table_element) → {Number}

    Adds a table element object to the list of tables and generates a cache_id for the table element object

    Parameters:
    Name Type Description
    table_element TableElement TableElement object to add to the cache
    Source:
    • scripts/cache_tables.js, line 97
    Returns:
    Returns the number of table element objects in the list
    Type
    Number

    <static> getItemByCacheId(cache_id) → {TableElement|CaptionElement|THeadElement|TBodyElement|TableRowElement|TableCellElement|null}

    Finds the the table cache element object with the matching cache id

    Parameters:
    Name Type Description
    cache_id String Cache id of table cache element object
    Source:
    • scripts/cache_tables.js, line 171
    Returns:
    Returns cache table element object if cache id is found, otherwise null
    Type
    TableElement | CaptionElement | THeadElement | TBodyElement | TableRowElement | TableCellElement | null

    <static> getRuleResultByCacheId(cache_id) → {ResultRule|null}

    Finds the the rule result object with the matching cache id

    Parameters:
    Name Type Description
    cache_id String Cache id of table cache element object
    Source:
    • scripts/cache_tables.js, line 206
    Returns:
    Returns cache rule result object if cache id is found, otherwise null
    Type
    ResultRule | null

    <static> getRuleResultByRuleId(rule_id) → {RuleResult|null}

    Gets the rule result object with the matching rule id

    Parameters:
    Name Type Description
    rule_id String rule id of table element
    Source:
    • scripts/cache_tables.js, line 231
    Returns:
    } Returns rule result object if rule id is found, otherwise null
    Type
    RuleResult | null

    <static> traverseDOMElementsForTableElements(dom_element, table_info)

    Traverses the DOMElements to update table elements

    Parameters:
    Name Type Description
    dom_element TableElement DOMElement object to check fo inclusion in tables cache
    table_info TableInformation Information needed for identifying the parent/child relationships of nested tables
    Source:
    • scripts/cache_tables.js, line 400

    <static> updateCache()

    Traverses the DOMElements to update the tables cache NOTE: This function is only used when the specialized caches are build as rules need them. In this condition, if the rules dependent on the controls cache are disabled, this cache would not be updated

    Source:
    • scripts/cache_tables.js, line 428

    <static> updateCacheItems(dom_element, table_info)

    Updates the tables cache object by checking to see if a dom element object should be added to the table cache objects

    Parameters:
    Name Type Description
    dom_element DOMElement DOMElement object to check for inclusion in tables cache
    table_info TableInfo Information about the current table relationships in the DOM
    Source:
    • scripts/cache_tables.js, line 261