🚀 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
5
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.0

coverage/Firefox 53.0.0 (Mac OS X 10.12.0)/base.css

36

lib/custom_a11y_rules.js

@@ -14,2 +14,19 @@ var customRules = {

{
'id': 'valid-ids',
'selector': '[id^="0"],[id^="1"],[id^="2"],[id^="3"],[id^="4"],[id^="5"],[id^="6"],[id^="7"],' +
'[id^="8"],[id^="9"]',
'enabled': true,
'tags': [ 'edx-custom' ],
'all': [],
'any': [],
'none': [
'invalid-id-extant'
],
'metadata': {
'description': 'Ensures element ids do not start with a number.',
'help': 'Element ids MUST not start with a number.',
'helpUrl': 'https://openedx.atlassian.net/wiki/display/A11Y/edX+Specific+Accessibility+Tests'
}
},
{
'id': 'nav-aria-label',

@@ -207,3 +224,3 @@ 'selector': 'nav',

validHeadings = ['H1', 'H2', 'H3', 'H4', 'H5', 'H6'];
if (childNode === 'HEADER' && node.children[0].children.length > 0) {

@@ -228,3 +245,3 @@ childNode = node.children[0].children[0].nodeName;

validElems = ['SPAN'];
if (validElems.indexOf(elem) > -1) {

@@ -236,4 +253,19 @@ return true;

}
},
{
'id': 'invalid-id-extant',
'metadata': {
'impact': 'critical',
'messages': {
'pass': 'element ids must not start with a number',
'fail': 'element ids must not start with a number'
},
},
evaluate: function(node, options) {
var nodeName = node.nodeName,
validElems = ['IFRAME'];
return (validElems.indexOf(nodeName) === -1);
}
}
]
};

2

package.json
{
"name": "edx-custom-a11y-rules",
"version": "0.1.3",
"version": "1.0.0",
"description": "Custom rules for accessibility testing with aXe Core",

@@ -5,0 +5,0 @@ "main": "",

Sorry, the diff of this file is not supported yet