🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

edx-custom-a11y-rules

Package Overview
Dependencies
Maintainers
11
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edx-custom-a11y-rules - npm Package Compare versions

Comparing version

to
1.0.6

11

lib/custom_a11y_rules.js

@@ -58,5 +58,5 @@ var customRules = {

'metadata': {
'description': 'Ensures the first link on the page is a skip link',
'help': 'The page should have a skip link as its first link',
'helpUrl': 'https://dequeuniversity.com/rules/axe/1.1/skip-link'
'description': 'Ensures that all skip links have a valid target',
'help': 'All skip links should have a valid target, allowing users to skip the navigation',
'helpUrl': 'https://dequeuniversity.com/rules/axe/3.2/skip-link'
}

@@ -121,2 +121,3 @@ },

evaluate: function(node, options) {
axe._tree = axe.utils.getFlattenedTree(node);
return axe.commons.aria.label(node) !== null;

@@ -137,2 +138,3 @@ }

evaluate: function(node, options) {
axe._tree = axe.utils.getFlattenedTree(node);
var label = axe.commons.aria.label(node) || '',

@@ -176,2 +178,5 @@ words = label.toLowerCase().split(' ');

linkTarget = document.querySelector(href);
if (!linkTarget) {
return false;
}
return axe.commons.dom.isFocusable(linkTarget);

@@ -178,0 +183,0 @@ } else {

{
"name": "edx-custom-a11y-rules",
"version": "1.0.5",
"version": "1.0.6",
"description": "Custom rules for accessibility testing with aXe Core",

@@ -26,3 +26,3 @@ "main": "",

"devDependencies": {
"axe-core": "~1.1.0",
"axe-core": "~3.2.2",
"jasmine-core": "^2.3.4",

@@ -29,0 +29,0 @@ "jshint": "^2.8.0",