Class: Continuum

Continuum

This class encapsulates all of the helper functionality Access Continuum offers for running Access Engine to test web projects.

Members

AMPReportingService

Gets the instance of the AMP reporting service associated with this instance of Continuum. Please consult our support documentation for more information on how to report to AMP.
Source:

includePotentialAccessibilityConcerns

Defines whether or not accessibility concerns that require manual review are included in any of Continuum's test results. This functionality is disabled by default, but it can be enabled via Continuum#setIncludePotentialAccessibilityConcerns. If enabled, any accessibility concerns that require manual review will have AccessibilityConcern#needsReview return true.
Source:

Methods

getAccessibilityConcerns() → {Array.<AccessibilityConcern>}

Gets the list of accessibility concerns found by Access Engine during the last test execution.
Source:
Returns:
Type
Array.<AccessibilityConcern>

getSupportedBestPractices() → {object}

Gets an object of key-value pairs, where the keys are IDs of best practices (defined in AMP and supported by Continuum) and the values are their descriptions. Make sure to invoke this Continuum#setUp method before invoking this method.
Source:
Returns:
Type
object

getSupportedStandards() → {object}

Gets an object of key-value pairs, where the keys are IDs of accessibility standards (defined in AMP and supported by Continuum) and the values are their names. Make sure to invoke this Continuum#setUp method before invoking this method.
Source:
Returns:
Type
object

getSupportedTests() → {object}

Gets an object of key-value pairs, where the keys are IDs of automatic Access Engine tests (supported by Continuum) and the values are their descriptions. Make sure to invoke this Continuum#setUp method before invoking this method.
Source:
Returns:
Type
object

runAllTests() → {Promise}

Runs all automatic Access Engine tests against the current page, as defined by the web driver used previously to invoke Continuum#setUp. Make sure to invoke this Continuum#setUp method before invoking this method.
Source:
Returns:
Type
Promise

runAllTestsOnNode(targetNodeOrCssSelectorForTargetNode) → {Promise}

Runs all automatic Access Engine tests against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke Continuum#setUp and the specified node or its CSS selector. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
targetNodeOrCssSelectorForTargetNode Element | string the target node, or its CSS selector, to restrict accessibility testing to
Source:
Returns:
Type
Promise

runTests(engineTestIds) → {Promise}

Runs only the specified automatic Access Engine tests against the current page, as defined by the web driver used previously to invoke Continuum#setUp. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
engineTestIds Array.<number> the IDs of the automatic Access Engine tests to test for (invoke Continuum#getSupportedTests for a list of these, or consult AMP)
Source:
Returns:
Type
Promise

runTestsOnNode(engineTestIds, targetNodeOrCssSelectorForTargetNode) → {Promise}

Runs only the specified automatic Access Engine tests against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke Continuum#setUp and the specified node or its CSS selector. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
engineTestIds Array.<number> the IDs of the automatic Access Engine tests to test for (invoke Continuum#getSupportedTests for a list of these, or consult AMP)
targetNodeOrCssSelectorForTargetNode Element | string the target node, or its CSS selector, to restrict accessibility testing to
Source:
Returns:
Type
Promise

(async) setIncludePotentialAccessibilityConcerns(includePotentialAccessibilityConcerns) → {Promise}

Globally sets whether or not accessibility concerns that require manual review are included in any of Continuum's test results. If enabled, any accessibility concerns that require manual review will have AccessibilityConcern#needsReview return true. This method is only available in the Pro edition of Continuum, otherwise it will return a Promise that rejects immediately.
Parameters:
Name Type Description
includePotentialAccessibilityConcerns boolean whether or not accessibility concerns that require manual review should be returned in any of Continuum's test results
Source:
Returns:
Type
Promise

(async) setUp(webDriver, locationPath, window)

Sets up Continuum for web testing.
Parameters:
Name Type Description
webDriver * a Selenium web driver to test with
locationPath string the relative path to an Access Engine JavaScript file, i.e. either AccessEngine.pro.js or AccessEngine.js for the Community or Pro editions of Continuum, respectively.
window Window the window whose content should be tested
Source:

setWindowUnderTest(targetWindow) → {Promise}

Sets the window to test. This can be used to set the testing context to the contents of an iframe element on the page, rather than the page an iframe element appears on.
Parameters:
Name Type Description
targetWindow Window the window to inject Access Engine into and prepare to test
Source:
Returns:
Type
Promise

testForBestPractices(bestPracticeIds) → {Promise}

Runs only the automatic Access Engine tests corresponding to the specified best practices against the current page, as defined by the web driver used previously to invoke Continuum#setUp. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
bestPracticeIds Array.<number> the IDs of the best practices to test for (invoke Continuum#getSupportedBestPractices for a list of these, or consult AMP)
Source:
Returns:
Type
Promise

testForNoticeability(minNoticeability) → {Promise}

Runs only the automatic Access Engine tests of or greater than the specified noticeability against the current page, as defined by the web driver used previously to invoke Continuum#setUp. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
minNoticeability number the inclusive minimum noticeability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeable
Source:
Returns:
Type
Promise

testForSeverity(minSeverity) → {Promise}

Runs only the automatic Access Engine tests of or greater than the specified severity against the current page, as defined by the web driver used previously to invoke Continuum#setUp. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
minSeverity number the inclusive minimum severity of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeable
Source:
Returns:
Type
Promise

testForStandards(standardIds) → {Promise}

Runs only the automatic Access Engine tests corresponding to the specified accessibility standards against the current page, as defined by the web driver used previously to invoke Continuum#setUp. Note that the IDs of the specified accessibility standards must also be specified in DEFAULT_ACCESSIBILITY_STANDARD_IDS, otherwise no accessibility concerns will be returned. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
standardIds Array.<number> the IDs of the accessibility standards to test for (invoke Continuum#getSupportedStandards for a list of these, or consult AMP)
Source:
Returns:
Type
Promise

testForTractability(minTractability) → {Promise}

Runs only the automatic Access Engine tests of or greater than the specified tractability against the current page, as defined by the web driver used previously to invoke Continuum#setUp. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
minTractability number the inclusive minimum tractability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeable
Source:
Returns:
Type
Promise

testNodeForBestPractices(bestPracticeIds, targetNodeOrCssSelectorForTargetNode) → {Promise}

Runs only the automatic Access Engine tests corresponding to the specified best practices against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke Continuum#setUp and the specified node or its CSS selector. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
bestPracticeIds Array.<number> the IDs of the best practices to test for (invoke Continuum#getSupportedBestPractices for a list of these, or consult AMP)
targetNodeOrCssSelectorForTargetNode Element | string the target node, or its CSS selector, to restrict accessibility testing to
Source:
Returns:
Type
Promise

testNodeForNoticeability(minNoticeability, targetNodeOrCssSelectorForTargetNode) → {Promise}

Runs only the automatic Access Engine tests of or greater than the specified noticeability against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke Continuum#setUp and the specified node or its CSS selector. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
minNoticeability number the inclusive minimum noticeability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeable
targetNodeOrCssSelectorForTargetNode Element | string the target node, or its CSS selector, to restrict accessibility testing to
Source:
Returns:
Type
Promise

testNodeForSeverity(minSeverity, targetNodeOrCssSelectorForTargetNode) → {Promise}

Runs only the automatic Access Engine tests of or greater than the specified severity against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke Continuum#setUp and the specified node or its CSS selector. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
minSeverity number the inclusive minimum severity of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeable
targetNodeOrCssSelectorForTargetNode Element | string the target node, or its CSS selector, to restrict accessibility testing to
Source:
Returns:
Type
Promise

testNodeForStandards(standardIds, targetNodeOrCssSelectorForTargetNode) → {Promise}

Runs only the automatic Access Engine tests corresponding to the specified accessibility standards against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke Continuum#setUp and the specified node or its CSS selector. Note that the IDs of the specified accessibility standards must also be specified in DEFAULT_ACCESSIBILITY_STANDARD_IDS, otherwise no accessibility concerns will be returned. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
standardIds Array.<number> the IDs of the accessibility standards to test for (invoke Continuum#getSupportedStandards for a list of these, or consult AMP)
targetNodeOrCssSelectorForTargetNode Element | string the target node, or its CSS selector, to restrict accessibility testing to
Source:
Returns:
Type
Promise

testNodeForTractability(minTractability, targetNodeOrCssSelectorForTargetNode) → {Promise}

Runs only the automatic Access Engine tests of or greater than the specified tractability against the current page for only the specified node and all its children, as defined by the web driver used previously to invoke Continuum#setUp and the specified node or its CSS selector. Make sure to invoke this Continuum#setUp method before invoking this method.
Parameters:
Name Type Description
minTractability number the inclusive minimum tractability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeable
targetNodeOrCssSelectorForTargetNode Element | string the target node, or its CSS selector, to restrict accessibility testing to
Source:
Returns:
Type
Promise