diff --git a/lib/core/public/load.js b/lib/core/public/load.js index 9595f3a9..e80d3d8f 100644 --- a/lib/core/public/load.js +++ b/lib/core/public/load.js @@ -42,13 +42,13 @@ function runCommand(data, keepalive, callback) { //a11y-engine iframe rules error merging logic const errors = a11yEngine.getErrors(); if (Object.keys(errors).length !== 0) { - if (results[results.length - 1].errorsObj) { + if (results[results.length - 1].a11yEngineErrors) { const error = results.pop(); - delete error.errorsObj; + delete error.a11yEngineErrors; const mergedErrors = mergeErrors(error, errors); - results.push({ ...mergedErrors, errorsObj: true }); + results.push({ ...mergedErrors, a11yEngineErrors: true }); } else { - results.push({ ...errors, errorsObj: true }); + results.push({ ...errors, a11yEngineErrors: true }); } } a11yEngine.clearErrors(); diff --git a/lib/core/public/run-rules.js b/lib/core/public/run-rules.js index e21a0b8a..effca205 100644 --- a/lib/core/public/run-rules.js +++ b/lib/core/public/run-rules.js @@ -65,9 +65,9 @@ export default function runRules(context, options, resolve, reject) { // after should only run once, so ensure we are in the top level window if (context.initiator) { // Return a11y-engine errors when at top level window - if (results[results.length - 1].errorsObj) { + if (results[results.length - 1].a11yEngineErrors) { const error = results.pop(); - delete error.errorsObj; + delete error.a11yEngineErrors; a11yEngine.mergeErrors(error); } diff --git a/lib/core/utils/merge-results.js b/lib/core/utils/merge-results.js index b76cf5b5..f6cf761b 100644 --- a/lib/core/utils/merge-results.js +++ b/lib/core/utils/merge-results.js @@ -84,9 +84,9 @@ function mergeResults(frameResults, options) { } const frameSpec = getFrameSpec(frameResult); - if (results[results.length - 1].errorsObj) { + if (results[results.length - 1].a11yEngineErrors) { const error = results.pop(); - delete error.errorsObj; + delete error.a11yEngineErrors; mergedErrors = mergeErrors(mergedErrors, error, frameSpec); } @@ -118,7 +118,7 @@ function mergeResults(frameResults, options) { if (Object.keys(mergedErrors).length === 0) { return mergedResult; } - return [...mergedResult, { ...mergedErrors, errorsObj: true }]; + return [...mergedResult, { ...mergedErrors, a11yEngineErrors: true }]; } function nodeIndexSort(nodeIndexesA = [], nodeIndexesB = []) {