Constructor: Cache

OpenAjax.a11y.nls.Cache

new Cache()

Constructs a DOMCache Object

Properties:
Name Type Description
nls String NLS cache items for properties
Source:
  • scripts/cache_nls.js, line 23

Methods

<static> addCacheNLSFromJSON()(locale, cache_nls_data)

Constructs a DOMCache Object

Parameters:
Name Type Description
locale locale Language code
cache_nls_data Object NLS cache items for properties
Source:
  • scripts/cache_nls.js, line 39

<static> addInvalidAttribute()

Identifies an invalid attribute

Source:
  • scripts/cache_nls.js, line 412

<static> addInvalidValue()

Identifies an invalid attribute value

Source:
  • scripts/cache_nls.js, line 431

<static> addPropertyIfDefined()

Adds an item to a list of properties

Source:
  • scripts/cache_nls.js, line 396

<static> getCacheNLS()

Returns the current cache nls object

Source:
  • scripts/cache_nls.js, line 56

<static> getLabelAndValueNLS(property, value) → {Object}

Returns the label, human readable value and description of a cache property

Parameters:
Name Type Description
property String The object property
value String | Number Current value of a property
Source:
  • scripts/cache_nls.js, line 130
Returns:
Returns object with three properties 'label', 'value' and 'description'
Type
Object

<static> getLabelNLS(property) → {Object}

Returns the label and description of a cache property

Parameters:
Name Type Description
property String The object property
Source:
  • scripts/cache_nls.js, line 191
Returns:
Returns object with two properties 'label' and 'description'
Type
Object

<static> getNLSEmptyAltTextMessage() → {String}

Returns the empty alt text message message and style

Source:
  • scripts/cache_nls.js, line 337
Returns:
Returns an object with a 'label' and 'style' property
Type
String

<static> getNLSMissingAltMessage() → {String}

Returns an NLS localized 'missing alt attribute' message

Source:
  • scripts/cache_nls.js, line 366
Returns:
Returns an object with a 'label' and 'style' property
Type
String

<static> getNLSMissingLabelMessage() → {String}

Returns the missing form control label message and style

Source:
  • scripts/cache_nls.js, line 308
Returns:
Returns an object with a 'label' and 'style' property
Type
String

<static> getResultValueNLS(result_value) → {Object}

Gets severity label, abbreviation, description and style

Parameters:
Name Type Description
result_value Number The constant representing the result of the evaluation (i.e. violation, warning, passed...)
Source:
  • scripts/cache_nls.js, line 71
Returns:
Returns a object with the following properties:
'label' : String representing the severity
'abbrev' : Abbreviation string of the label
'description' : String describing the severity
'style' : String that can used for styling the label
Type
Object

<static> getRuleCategory(id) → {Object}

Get localized string for a rule category

Parameters:
Name Type Description
id Number The constant representing the rule category
Source:
  • scripts/cache_nls.js, line 97
Returns:
Returns the NLS object for a rule category, empty object if not found Properties of the object include: "title", "url" and "desc"
Type
Object

<static> getValueNLS(property, value) → {String}

Returns the value of a cache property

Parameters:
Name Type Description
property String The object property
value String | Number Current value of a property
Source:
  • scripts/cache_nls.js, line 228
Returns:
Returns string with the localized value of a property
Type
String

<static> getYesNoNLS(value) → {String}

Get a localized "Yes" or "No" string

Parameters:
Name Type Description
value Boolean A boolean value to get string
Source:
  • scripts/cache_nls.js, line 283
Returns:
Returns 'Yes" if true, otherwise 'No'
Type
String