Skip to content

Commit dd30a07

Browse files
committed
Added Section 508
1 parent 35b44fc commit dd30a07

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

Gruntfile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module.exports = function (grunt) {
9393
grunt.registerTask('exportVars', function() {
9494
var catted = '';
9595

96-
grunt.file.expand({ filter: 'isFile' }, 'Standards/WCAG2AAA/**/**/**/*.js')
96+
grunt.file.expand({ filter: 'isFile' }, 'Standards/{Section508,WCAG2AAA}/**/**/**/*.js')
9797
.forEach(function(file) {
9898
catted += grunt.file.read(file) + '\n';
9999
var parts = file.split("/"),
@@ -103,6 +103,9 @@ module.exports = function (grunt) {
103103
catted += "module.exports." + varName + " = " + varName + ";\n";
104104
}
105105
);
106+
catted += grunt.file.read('Standards/WCAG2AA/ruleset.js');
107+
catted += grunt.file.read('Standards/WCAG2A/ruleset.js');
108+
catted += grunt.file.read('Standards/Section508/ruleset.js');
106109
grunt.file.write('Standards/all.js', catted, { encoding: 'utf8' })
107110
});
108111

Standards/Section508/ruleset.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
var HTMLCS_Section508 = {
1515
name: 'Section508',
16+
subsetOf: 'Section508_Sniffs_',
1617
description: 'U.S. Section 508 Standard',
1718
sniffs: [
1819
'A',
@@ -41,3 +42,5 @@ var HTMLCS_Section508 = {
4142
return retval;
4243
}
4344
};
45+
46+
module.exports.HTMLCS_Section508 = HTMLCS_Section508;

Standards/WCAG2A/ruleset.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313

1414
var HTMLCS_WCAG2A = {
1515
name: 'WCAG2A',
16+
subsetOf: 'WCAG2AAA_Sniffs_',
1617
description: 'Web Content Accessibility Guidelines (WCAG) 2.1 A',
1718
sniffs: [
18-
{
19-
standard: 'WCAG2AAA',
20-
include: [
2119
'Principle1.Guideline1_1.1_1_1',
2220
'Principle1.Guideline1_2.1_2_1',
2321
'Principle1.Guideline1_2.1_2_2',
@@ -49,9 +47,7 @@ var HTMLCS_WCAG2A = {
4947
'Principle3.Guideline3_3.3_3_2',
5048
'Principle4.Guideline4_1.4_1_1',
5149
'Principle4.Guideline4_1.4_1_2'
52-
]
53-
}
54-
],
50+
],
5551
getMsgInfo: function(code) {
5652
return HTMLCS_WCAG2AAA.getMsgInfo(code);
5753
}

Standards/WCAG2AA/ruleset.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313

1414
var HTMLCS_WCAG2AA = {
1515
name: 'WCAG2AA',
16+
subsetOf: 'WCAG2AAA_Sniffs_',
1617
description: 'Web Content Accessibility Guidelines (WCAG) 2.1 AA',
1718
sniffs: [
18-
{
19-
standard: 'WCAG2AAA',
20-
include: [
2119
'Principle1.Guideline1_1.1_1_1',
2220
'Principle1.Guideline1_2.1_2_1',
2321
'Principle1.Guideline1_2.1_2_2',
@@ -70,9 +68,7 @@ var HTMLCS_WCAG2AA = {
7068
'Principle4.Guideline4_1.4_1_1',
7169
'Principle4.Guideline4_1.4_1_2',
7270
'Principle4.Guideline4_1.4_1_3'
73-
]
74-
}
75-
],
71+
],
7672
getMsgInfo: function(code) {
7773
return HTMLCS_WCAG2AAA.getMsgInfo(code);
7874
}

0 commit comments

Comments
 (0)