accessibility.api.php

  1. cis7 sites/all/modules/ulmus/accessibility/accessibility.api.php
  2. cle7 sites/all/modules/ulmus/accessibility/accessibility.api.php
  3. ecd7 sites/all/modules/ulmus/accessibility/accessibility.api.php
  4. elmsmedia7 sites/all/modules/ulmus/accessibility/accessibility.api.php
  5. harmony7 sites/all/modules/ulmus/accessibility/accessibility.api.php
  6. icor7 sites/all/modules/ulmus/accessibility/accessibility.api.php
  7. meedjum_blog7 sites/all/modules/ulmus/accessibility/accessibility.api.php
  8. mooc7 sites/all/modules/ulmus/accessibility/accessibility.api.php

Descriptions of hooks provided by the accessibility module.

Functions

Namesort descending Description
hook_accessibility_get_test_translation Returns the human-readable translation (used for subject, description) of a test.
hook_accessibility_guidelines Returns a list of machine names of tests that are associated with a guideline.
hook_accessibility_load A simple hook that is called when the accessibility module is being used on a page. You can use this to load additional javascript files.
hook_accessibility_tests Allows modules to define their own accessibility tests, as well as default translations and additional javascript files to load.

File

sites/all/modules/ulmus/accessibility/accessibility.api.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Descriptions of hooks provided by the accessibility module.
  5. */
  6. /**
  7. * A simple hook that is called when the accessibility module
  8. * is being used on a page. You can use this to load additional
  9. * javascript files.
  10. */
  11. function hook_accessibility_load() {
  12. drupal_add_js(drupal_get_path('module', 'my_module') . '/my_module.js');
  13. }
  14. /**
  15. * Allows modules to define their own accessibility tests, as well as
  16. * default translations and additional javascript files to load.
  17. */
  18. function hook_accessibility_tests($get_translation) {
  19. return array('my_test' => array(
  20. 'title' => t('My accessibility test'),
  21. 'subject' => t('Make sure you have accessible content'),
  22. 'description' => t('Accessibility is a legal obligation and a moral responsibility.'),
  23. 'severity' => ACCESSIBILITY_TEST_SEVERE,
  24. 'type' => 'selector',
  25. 'selector' => '.myclass',
  26. 'js' => array(
  27. drupal_get_path('module', 'my_module') .'/my_module.js',
  28. ),
  29. 'css' => array(
  30. drupal_get_path('module', 'my_module') .'/my_module.css',
  31. )
  32. ),
  33. );
  34. }
  35. /**
  36. * Returns the human-readable translation (used for subject, description) of a test.
  37. */
  38. function hook_accessibility_get_test_translation($test) {
  39. return array('title' => t('Title of my test'),
  40. 'body' => t('Description of my test'),
  41. );
  42. }
  43. /**
  44. * Returns a list of machine names of tests that are associated with a guideline.
  45. */
  46. function hook_accessibility_guidelines($tests = FALSE) {
  47. return array('guideline_key' => array('title' => t('My Guideline')));
  48. }
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.