Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

add bik bitv link rendering #123

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var _ = require('underscore');
var crypto = require('crypto');
var fs = require('fs');
var mkdirp = require('mkdirp');
var bikBitvMap = require(__dirname + '/../resource/bikBitvArrayMap.json');

module.exports = {
config : config,
Expand Down Expand Up @@ -91,6 +92,10 @@ function reportResults(results, url) {
var errorCount = 0;
var warningCount = 0;
var noticeCount = 0;
/** maping of the wcag note codes to the bik test tasks
* list of the tasks: http://www.bitvtest.de/bitvtest/das_testverfahren_im_detail/pruefschritte.html
**/
var bikCodeMap = {};

results.forEach(
function(result, index) {
Expand All @@ -103,6 +108,9 @@ function reportResults(results, url) {
result.noteCodes.forEach(
function (value) {
noteCodes[value] = value;
if ( _.findWhere(bikBitvMap.wcagNoteCodes, { noteCode:noteCodes[value] }) != undefined){
bikCodeMap[value] = _.findWhere(bikBitvMap.wcagNoteCodes, { noteCode:noteCodes[value] });
}
}
);

Expand Down Expand Up @@ -142,6 +150,7 @@ function reportResults(results, url) {
noticePercentage : noticePercentage,
results : results,
noteCodes : noteCodes,
bikCodeMap : bikCodeMap,
css : {
common: fs.readFileSync(__dirname + '/../view/common.css', {encoding: 'utf-8'})
}
Expand Down
Loading