Skip to content

Commit

Permalink
Merge branch 'master' of github.com:open-indy/Koa11y
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJaredWilcurt committed Aug 23, 2017
2 parents 82a9059 + 52a444d commit 2fb4413
Show file tree
Hide file tree
Showing 11 changed files with 749 additions and 729 deletions.
2 changes: 2 additions & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ rules:
- outline
- outline-offset
- overflow
- overflow-x
- overflow-y
- perspective
- pointer-events
- -webkit-transform
Expand Down
3 changes: 0 additions & 3 deletions _sass/_modal.sass
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@ $modalFadeDuration: 0.3s
.modal-enter,
.modal-leave-active
opacity: 0.0

.modal-enter,
.modal-leave-active
.modal-content
transform: scale(1.1)
2 changes: 1 addition & 1 deletion _scripts/_outputs/format-CSV.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function formatCSV (imageStats, results) {
// Ensure that the imageStats Object is not empty
if (!(Object.keys(imageStats).length === 0 && imageStats.constructor === Object)) {
if (!(Object.keys(imageStats).length === 0)) {
// TODO: I don't know how to structure the data for CSV so that it can also contain ImgAlts data
console.log(window.imageStats); // eslint-disable-line no-console
}
Expand Down
8 changes: 5 additions & 3 deletions _scripts/_outputs/format-HTML.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
/* eslint-disable no-multi-spaces */

var fs = require('fs-extra');

function formatHTML (imageStats, results, url, buttons) {
var returnedErrors = '';
var returnedWarnings = '';
var returnedNotices = '';
var panelColor = '';

for (var i = 0; i < results.length; i++) {
var resultsType = results[i].type;
if (resultsType == 'warning') {
Expand Down Expand Up @@ -40,13 +43,12 @@ function formatHTML (imageStats, results, url, buttons) {

var template = fs.readFileSync('_markup/template.html', 'utf8');

console.log(template);
var results = returnedErrors + returnedWarnings + returnedNotices;
results = returnedErrors + returnedWarnings + returnedNotices;

var imgAlts = '';

// Ensure that the imageStats Object is not empty
if (!(Object.keys(imageStats).length === 0 && imageStats.constructor === Object)) {
if (!(Object.keys(imageStats).length === 0)) {
var totalImages = imageStats.totalImages;
var descriptive = imageStats.descriptive;
var descriptivePercent = imageStats.descriptivePercent;
Expand Down
2 changes: 1 addition & 1 deletion _scripts/_outputs/format-JSON.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function formatJSON (imageStats, results) {
var outputJSON = {};
// Ensure that the imageStats Object is not empty
if (!(Object.keys(imageStats).length === 0 && imageStats.constructor === Object)) {
if (!(Object.keys(imageStats).length === 0)) {
outputJSON.images = imageStats;
}
outputJSON.results = results;
Expand Down
2 changes: 1 addition & 1 deletion _scripts/_outputs/format-MD.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function formatMD (imageStats, results, urlValue) {

var output = '# ' + urlValue + '\n\n';
// Ensure that the imageStats Object is not empty
if (!(Object.keys(imageStats).length === 0 && imageStats.constructor === Object)){
if (!(Object.keys(imageStats).length === 0)){
output = output + '## Image Accessibility\n\n';
output = output + '**Total Images:** ' + imageStats.totalImages + ' \n';
output = output + '**Descriptive Alt Text:** ' + imageStats.descriptive + ' \n';
Expand Down
2 changes: 1 addition & 1 deletion _scripts/_outputs/format-XML.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function formatXML (imageStats, results) {

var imgAlts = '';
// Ensure that the imageStats Object is not empty
if (!(Object.keys(imageStats).length === 0 && imageStats.constructor === Object)) {
if (!(Object.keys(imageStats).length === 0)) {
imgAlts =
' <imagealts>\n' +
' <totalimages>' + imageStats.totalImages + '</totalimages>\n' +
Expand Down
Loading

0 comments on commit 2fb4413

Please sign in to comment.