function accessibility_accessibility_tests

cis7 accessibility.module accessibility_accessibility_tests($get_translation = FALSE)
cle7 accessibility.module accessibility_accessibility_tests($get_translation = FALSE)
elmsmedia7 accessibility.module accessibility_accessibility_tests($get_translation = FALSE)
icor7 accessibility.module accessibility_accessibility_tests($get_translation = FALSE)
meedjum_blog7 accessibility.module accessibility_accessibility_tests($get_translation = FALSE)
mooc7 accessibility.module accessibility_accessibility_tests($get_translation = FALSE)

Implements hook_accessibility_tests().

File

sites/all/modules/ulmus/accessibility/accessibility.module, line 669

Code

function accessibility_accessibility_tests($get_translation = FALSE) {
  $suffix = ($get_translation) ? 'translated' : '';
  if ($cache = cache_get('accessibility_quail_tests_' . $suffix)) {
    return $cache->data;
  }
  $library_path = libraries_get_path('quail');
  $tests = (array) json_decode(file_get_contents($library_path . '/src/resources/tests.json'));
  $test_translation = array(
    '0' => ACCESSIBILITY_TEST_SUGGESTION,
    '.5' => ACCESSIBILITY_TEST_MODERATE,
    '1' => ACCESSIBILITY_TEST_SEVERE,
  );
  foreach ($tests as &$test) {
    $test = (array) $test;
    if (isset($test['testability'])) {
      $test['severity'] = $test_translation[$test['testability']];
    }
  }
  if ($get_translation) {
    foreach ($tests as $testname => &$test) {
      $translation = module_invoke_all('accessibility_get_test_translation', $testname);
      $test['title'] = $translation['title'];
      $test['description'] = $translation['body'];
    }
  }
  cache_set('accessibility_quail_tests_' . $suffix, $tests);
  return $tests;
}
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.