diff --git a/bookmarklets/background-images.html b/bookmarklets/background-image-hide.html similarity index 69% rename from bookmarklets/background-images.html rename to bookmarklets/background-image-hide.html index 241ed1a..f1c9ac5 100644 --- a/bookmarklets/background-images.html +++ b/bookmarklets/background-image-hide.html @@ -12,3 +12,4 @@
+
diff --git a/bookmarklets/background-image-hide.js b/bookmarklets/background-image-hide.js new file mode 100644 index 0000000..15e043f --- /dev/null +++ b/bookmarklets/background-image-hide.js @@ -0,0 +1,26 @@ +/** + * @bookmarklet Background image hide + * @description Hide all CSS background images + * @author Zoe Mickley Gillenwater + * @authorUrl https://zomigi.com/blog/bookmarklets-for-accessibility-testing/ + * @tags utility + * @pageTest true + */ +(function () { + var tags = document.getElementsByTagName("*"); + var element; + for (var i = 0; i < tags.length; i++) { + element = tags[i]; + if (element.currentStyle) { + if (element.currentStyle["backgroundImage"] !== "none") + element.style.backgroundImage = "none"; + } else if (window.getComputedStyle) { + if ( + document.defaultView + .getComputedStyle(element, null) + .getPropertyValue("background-image") !== "none" + ) + element.style.backgroundImage = "none"; + } + } +})(); diff --git a/bookmarklets/background-image-highlight.html b/bookmarklets/background-image-highlight.html new file mode 100644 index 0000000..f1c9ac5 --- /dev/null +++ b/bookmarklets/background-image-highlight.html @@ -0,0 +1,15 @@ + + +
+
+
diff --git a/bookmarklets/background-images.js b/bookmarklets/background-image-highlight.js similarity index 94% rename from bookmarklets/background-images.js rename to bookmarklets/background-image-highlight.js index 6fe18f9..157e145 100644 --- a/bookmarklets/background-images.js +++ b/bookmarklets/background-image-highlight.js @@ -1,5 +1,5 @@ /** - * @bookmarklet Background images + * @bookmarklet Background image highlight * @description Highlight all CSS background images * @author Zoe Mickley Gillenwater * @authorUrl https://zomigi.com/blog/bookmarklets-for-accessibility-testing/ diff --git a/bookmarklets/test-csp.js b/bookmarklets/test-csp.js index 06ae99a..e12972d 100644 --- a/bookmarklets/test-csp.js +++ b/bookmarklets/test-csp.js @@ -11,7 +11,7 @@ document.addEventListener("securitypolicyviolation", cspCheck, false); var testScript = document.createElement("script"); testScript.setAttribute( "src", - "https://jsnmrs.github.io/bookmarklets/bookmarklets/test-js-external.js" + "https://code.jasonmorris.com/bookmarklets/bookmarklets/test-js-external.js" ); document.body.appendChild(testScript); diff --git a/bookmarklets/truncation.js b/bookmarklets/truncation.js index cfe077d..8237e8d 100644 --- a/bookmarklets/truncation.js +++ b/bookmarklets/truncation.js @@ -3,7 +3,7 @@ * @description Identify instances of text-overflow: ellipsis * @author Jason Morris * @authorUrl https://jasonmorris.com - * @tags accessibility + * @tags accessibility, wcag:1.4.10 * @pageTest true */ (function () { diff --git a/data/bookmarks.html b/data/bookmarks.html index 29dedfd..b7b10a4 100644 --- a/data/bookmarks.html +++ b/data/bookmarks.html @@ -9,7 +9,8 @@

Bookmarks Menu

Are ya hidden?
Autocomplete -
Background images +
Background image hide +
Background image highlight
Blur page
Buttons
Character key shortcuts @@ -51,7 +52,7 @@

Bookmarks Menu

Show focus styles
Remove onpaste
Target spacing check -
Test CSP +
Test CSP
Test local JS
Text spacing
Text zoom 200%