UNPKG

accessibility-checker

Version:

An automated testing tools for accessibility testing using Puppeteer, Selenium, or Zombie

110 lines (107 loc) 4.56 kB
"use strict"; /****************************************************************************** Copyright:: 2020- IBM, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *****************************************************************************/ Object.defineProperty(exports, "__esModule", { value: true }); exports.RuleManual = exports.RulePotential = exports.RuleFail = exports.RuleRender = exports.RulePass = exports.eRuleCategory = exports.eToolkitLevel = exports.eRulePolicy = exports.eRuleConfidence = exports.eRuleLevel = void 0; var eRuleLevel; (function (eRuleLevel) { eRuleLevel["violation"] = "violation"; eRuleLevel["potentialviolation"] = "potentialviolation"; eRuleLevel["recommendation"] = "recommendation"; eRuleLevel["potentialrecommendation"] = "potentialrecommendation"; eRuleLevel["manual"] = "manual"; eRuleLevel["pass"] = "pass"; eRuleLevel["ignored"] = "ignored"; })(eRuleLevel = exports.eRuleLevel || (exports.eRuleLevel = {})); var eRuleConfidence; (function (eRuleConfidence) { eRuleConfidence["PASS"] = "PASS"; eRuleConfidence["FAIL"] = "FAIL"; eRuleConfidence["POTENTIAL"] = "POTENTIAL"; eRuleConfidence["MANUAL"] = "MANUAL"; })(eRuleConfidence = exports.eRuleConfidence || (exports.eRuleConfidence = {})); var eRulePolicy; (function (eRulePolicy) { eRulePolicy["VIOLATION"] = "VIOLATION"; eRulePolicy["RECOMMENDATION"] = "RECOMMENDATION"; eRulePolicy["INFORMATION"] = "INFORMATION"; })(eRulePolicy = exports.eRulePolicy || (exports.eRulePolicy = {})); var eToolkitLevel; (function (eToolkitLevel) { eToolkitLevel["LEVEL_ONE"] = "1"; eToolkitLevel["LEVEL_TWO"] = "2"; eToolkitLevel["LEVEL_THREE"] = "3"; eToolkitLevel["LEVEL_FOUR"] = "4"; })(eToolkitLevel = exports.eToolkitLevel || (exports.eToolkitLevel = {})); var eRuleCategory; (function (eRuleCategory) { eRuleCategory["ACCESSIBILITY"] = "Accessibility"; eRuleCategory["DESIGN"] = "Design"; eRuleCategory["OTHER"] = "Other"; })(eRuleCategory = exports.eRuleCategory || (exports.eRuleCategory = {})); function RulePass(reasonId, messageArgs, apiArgs) { if (typeof reasonId === "undefined" || reasonId === null) throw new Error("Reason ID must be defined"); return { value: [eRulePolicy.INFORMATION, eRuleConfidence.PASS], reasonId: reasonId, messageArgs: messageArgs || [], apiArgs: apiArgs || [] }; } exports.RulePass = RulePass; function RuleRender(reasonId, messageArgs, apiArgs) { if (typeof reasonId === "undefined" || reasonId === null) throw new Error("Reason ID must be defined"); return { value: [eRulePolicy.INFORMATION, eRuleConfidence.PASS], reasonId: 0, messageArgs: messageArgs || [], apiArgs: apiArgs || [] }; } exports.RuleRender = RuleRender; function RuleFail(reasonId, messageArgs, apiArgs) { if (typeof reasonId === "undefined" || reasonId === null) throw new Error("Reason ID must be defined"); return { value: [eRulePolicy.INFORMATION, eRuleConfidence.FAIL], reasonId: reasonId, messageArgs: messageArgs || [], apiArgs: apiArgs || [] }; } exports.RuleFail = RuleFail; function RulePotential(reasonId, messageArgs, apiArgs) { if (typeof reasonId === "undefined" || reasonId === null) throw new Error("Reason ID must be defined"); return { value: [eRulePolicy.INFORMATION, eRuleConfidence.POTENTIAL], reasonId: reasonId, messageArgs: messageArgs || [], apiArgs: apiArgs || [] }; } exports.RulePotential = RulePotential; function RuleManual(reasonId, messageArgs, apiArgs) { if (typeof reasonId === "undefined" || reasonId === null) throw new Error("Reason ID must be defined"); return { value: [eRulePolicy.INFORMATION, eRuleConfidence.MANUAL], reasonId: reasonId, messageArgs: messageArgs || [], apiArgs: apiArgs || [] }; } exports.RuleManual = RuleManual; //# sourceMappingURL=IEngine.js.map