-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 14918ca
Showing
25 changed files
with
7,708 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
setTimeout(() => { | ||
IdentifyInputPurpose() | ||
}, 600); | ||
|
||
function IdentifyInputPurpose() { | ||
$.fn.log = function () { | ||
console.log.apply(console, this); | ||
return this; | ||
}; | ||
var inputTags = document.querySelectorAll('input') | ||
for (var a = 0; a < inputTags.length; a++) { | ||
if (inputTags[a].type != "hidden") { | ||
if (inputTags[a].autocomplete == undefined || inputTags[a].autocomplete == "") { | ||
console.log("%cRule:%cWCAG 1.3.5 (2.1,AA)", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px 0px 0px 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`, | ||
`color: #FFF; | ||
display: inline; | ||
font-size: 0.8rem; | ||
background-color: #809FFF; | ||
border-radius: 0px 5px 5px 0px; | ||
padding: 5px 10px; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
console.log("%cError:%cAutoComplete is missing in input tag", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px 0px 0px 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`, | ||
`color: #FFF; | ||
display: inline; | ||
font-size: 0.8rem; | ||
background-color: #F6976E; | ||
border-radius: 0px 5px 5px 0px; | ||
padding: 5px 10px; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
console.log("%cCode Snippet:", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
$(inputTags[a]).log() | ||
console.log("%cFix:%cAdd autocomplete='INPUT PURPOSE'", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px 0px 0px 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`, | ||
`color: #FFF; | ||
display: inline; | ||
font-size: 0.8rem; | ||
background-color: #007075; | ||
border-radius: 0px 5px 5px 0px; | ||
padding: 5px 10px; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
console.log("%c-----------------------------------------------------------------------------", | ||
`color: #FFF; | ||
background-color: #293543; | ||
font-weight: bolder; | ||
border-radius: 5px; | ||
padding: 5px 10px; | ||
font-size: 1rem; | ||
display: inline;`) | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
setTimeout(() => { | ||
IdentifyPurpose() | ||
}, 600); | ||
|
||
function IdentifyPurpose() { | ||
$.fn.log = function () { | ||
console.log.apply(console, this); | ||
return this; | ||
}; | ||
$(document).ready(function () { | ||
$('*').each(function () { | ||
if ($(this).prop("nodeName") == "SECTION" || | ||
$(this).prop("nodeName") == "FORM" || | ||
$(this).prop("nodeName") == "NAV" || | ||
$(this).prop("nodeName") == "MAIN") { | ||
var checkRoleAttr = $(this).attr('role'); | ||
if (checkRoleAttr == undefined || checkRoleAttr == false || checkRoleAttr == null) { | ||
console.log("%cRule:%cWCAG 1.3.6 (2.1,AAA)", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px 0px 0px 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`, | ||
`color: #FFF; | ||
display: inline; | ||
font-size: 0.8rem; | ||
background-color: #809FFF; | ||
border-radius: 0px 5px 5px 0px; | ||
padding: 5px 10px; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
console.log("%cError:%cUsing ARIA landmarks to identify regions of a page is Missing.", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px 0px 0px 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`, | ||
`color: #FFF; | ||
display: inline; | ||
font-size: 0.8rem; | ||
background-color: #EB5177; | ||
border-radius: 0px 5px 5px 0px; | ||
padding: 5px 10px; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
console.log("%cCode Snippet:", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
$(this).log() | ||
console.log("%cFix:%cAdd role='PURPOSE'", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px 0px 0px 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`, | ||
`color: #FFF; | ||
display: inline; | ||
font-size: 0.8rem; | ||
background-color: #007075; | ||
border-radius: 0px 5px 5px 0px; | ||
padding: 5px 10px; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
console.log("%c-----------------------------------------------------------------------------", | ||
`color: #FFF; | ||
background-color: #293543; | ||
font-weight: bolder; | ||
border-radius: 5px; | ||
padding: 5px 10px; | ||
font-size: 1rem; | ||
display: inline;`) | ||
|
||
} | ||
} | ||
}) | ||
}) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
setTimeout(() => { | ||
UseOfColor() | ||
}, 1200); | ||
|
||
function UseOfColor() { | ||
// var checkIf = false | ||
// if (document.body.style.color != null || document.body.style.color != "") { | ||
// if (document.body.style.backgroundColor != null || document.body.style.backgroundColor != "") { | ||
// checkIf = true | ||
// } | ||
// } | ||
// if (!checkIf) { | ||
// console.log("-----------------------------------------") | ||
// console.log("Rule: WCAG 1.4.1 (2.0,A)") | ||
// console.log("Error: Either color or background color of the body tag is empty/null") | ||
// console.log("Code Snippet: ", document.body.outerHTML) | ||
// console.log("Fix: Both the above attributes have to be either set or unset") | ||
// } | ||
$.fn.log = function () { | ||
console.log.apply(console, this); | ||
return this; | ||
}; | ||
var imgTags = document.getElementsByTagName("img") | ||
for (let index = 0; index < imgTags.length; index++) { | ||
var warningT = false | ||
if (parseInt(imgTags[index].naturalWidth) > 100 && parseInt(imgTags[index].naturalHeight) > 100) { | ||
warningT = true | ||
} else if (parseInt(imgTags[index].css("width").replace("px", "")) > 100 && parseInt(imgTags[index].css("height").replace("px", "")) > 100) { | ||
warningT = true | ||
} | ||
if (warningT) { | ||
console.log("%cRule:%cWCAG 1.4.1 (2.0,A)", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px 0px 0px 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`, | ||
`color: #FFF; | ||
display: inline; | ||
font-size: 0.8rem; | ||
background-color: #809FFF; | ||
border-radius: 0px 5px 5px 0px; | ||
padding: 5px 10px; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
console.log("%cWarning:%cImage might be using color alone", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px 0px 0px 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`, | ||
`color: #FFF; | ||
display: inline; | ||
font-size: 0.8rem; | ||
background-color: #F6976E; | ||
border-radius: 0px 5px 5px 0px; | ||
padding: 5px 10px; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
console.log("%cCode Snippet:", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
$(imgTags[index]).log() | ||
console.log("%cFix:%cSet the text relating to the image in a way that text refers to the image not by color alone", | ||
`color: #FFF; | ||
background-color: #333; | ||
border-radius: 5px 0px 0px 5px; | ||
padding: 5px 10px; | ||
font-size: 0.8rem; | ||
display: inline; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`, | ||
`color: #FFF; | ||
display: inline; | ||
font-size: 0.8rem; | ||
background-color: #007075; | ||
border-radius: 0px 5px 5px 0px; | ||
padding: 5px 10px; | ||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);`) | ||
console.log("%c-----------------------------------------------------------------------------", | ||
`color: #FFF; | ||
background-color: #293543; | ||
font-weight: bolder; | ||
border-radius: 5px; | ||
padding: 5px 10px; | ||
font-size: 1rem; | ||
display: inline;`) | ||
} | ||
|
||
|
||
} | ||
} |
Oops, something went wrong.