new Rules()
Creates an array of rule objects for evaluating accessibility
- Source:
- scripts/rules.js, line 883
Methods
-
<static> addRule(rule_item) → {Boolean}
-
Adds a new rule to the list of rules
Parameters:
Name Type Description rule_item
Object Object containing rule information - Source:
- scripts/rules.js, line 899
Returns:
Returns true if the rule was added successfully; false if there was an error- Type
- Boolean
-
<static> addRulesFromJSON(rule_array) → {Boolean}
-
Adds a rules from a list of rules in JSON format
Parameters:
Name Type Description rule_array
Object An array of objects representing OAA rules - Source:
- scripts/rules.js, line 965
Returns:
Returns true if the rules were added successfully; false if there was an error- Type
- Boolean
-
<static> addRulesNLSFromJSON(rule_array) → {Boolean}
-
Adds a rule NLS
Parameters:
Name Type Description rule_array
Object An array of objects representing OAA rules - Source:
- scripts/rules.js, line 1000
Returns:
Returns true if the rules were added successfully; false if there was an error- Type
- Boolean
-
<static> getRuleByRuleId(rule_id) → {Rule}
-
Returned rule object with the id
Parameters:
Name Type Description rule_id
String id of the rule to find - Source:
- scripts/rules.js, line 1018
Returns:
Returns rule object if the rule id is found; null if the rule id is not found- Type
- Rule
-
<static> toJSON() → {String}
-
Exports current rule information to a JSON format
- Source:
- scripts/rules.js, line 1068
Returns:
JSON formatted string- Type
- String
-
<static> validCacheDependency(cache_name) → {Boolean}
-
Checks to see if the cache reference is valid
Parameters:
Name Type Description cache_name
String Property name of the cache - Source:
- scripts/rules.js, line 1043
Returns:
Returns true if the cache dependency is valid; otherwise false- Type
- Boolean