function hook_accessibility_tests

cis7 accessibility.api.php hook_accessibility_tests($get_translation)
cle7 accessibility.api.php hook_accessibility_tests($get_translation)
elmsmedia7 accessibility.api.php hook_accessibility_tests($get_translation)
icor7 accessibility.api.php hook_accessibility_tests($get_translation)
meedjum_blog7 accessibility.api.php hook_accessibility_tests($get_translation)
mooc7 accessibility.api.php hook_accessibility_tests($get_translation)

Allows modules to define their own accessibility tests, as well as default translations and additional javascript files to load.

1 function implements hook_accessibility_tests()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

accessibility_accessibility_tests in sites/all/modules/ulmus/accessibility/accessibility.module
Implements hook_accessibility_tests().
3 invocations of hook_accessibility_tests()
accessibility_tests_json in sites/all/modules/ulmus/accessibility/accessibility.pages.inc
Outputs settings and test information in JSON.
accessibility_tests_list in sites/all/modules/ulmus/accessibility/accessibility.admin.inc
Form for importing tests.
accessibility_tests_list_submit in sites/all/modules/ulmus/accessibility/accessibility.admin.inc
Form submit callback for importing tests.

File

sites/all/modules/ulmus/accessibility/accessibility.api.php, line 21
Descriptions of hooks provided by the accessibility module.

Code

function hook_accessibility_tests($get_translation) {
  return array(
    'my_test' => array(
      'title' => t('My accessibility test'),
      'subject' => t('Make sure you have accessible content'),
      'description' => t('Accessibility is a legal obligation and a moral responsibility.'),
      'severity' => ACCESSIBILITY_TEST_SEVERE,
      'type' => 'selector',
      'selector' => '.myclass',
      'js' => array(
        drupal_get_path('module', 'my_module') . '/my_module.js',
      ),
      'css' => array(
        drupal_get_path('module', 'my_module') . '/my_module.css',
      ),
    ),
  );
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.