Constructor: Rulesets

OpenAjax.a11y.Rulesets

new Rulesets()

Information on the rulesets available for evauating documents

Properties:
Name Type Description
rulesets Array Associative array of rulesets
Source:
  • scripts/ruleset.js, line 8

Methods

<static> addRuleset(type, rulesetdata)

Adds a localized version of WCAG 2.0 requirements to the cache

Parameters:
Name Type Description
type string Type of ruleset (WCAG 2.0 ruleset is the only type currently supported)
rulesetdata Object JSON object containing the ruleset information
Source:
  • scripts/ruleset.js, line 38

<static> getAllRulesets() → {Array}

Gets NLS ruleset information for all rulesets

Source:
  • scripts/ruleset.js, line 96
Returns:
Array of objects that contain NLS information about a ruleset
Type
Array

<static> getRuleset(ruleset_id)

Gets a ruleset with the specified ID

Parameters:
Name Type Description
ruleset_id string Ruleset id of the ruleset to return
Source:
  • scripts/ruleset.js, line 72

<static> toJSON(prefix) → {String}

Returns a JSON representation of the rule

Parameters:
Name Type Description
prefix String String of leading spaces for formatting JSON output (Optional)
Source:
  • scripts/ruleset.js, line 117
Returns:
Returns a JSON representation of the rule
Type
String