about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <{ID}+{username}@users.noreply.github.com>2024-12-23 14:38:33 -0500
committerelioat <{ID}+{username}@users.noreply.github.com>2024-12-23 14:38:33 -0500
commitdd37de88a2e87cabd2f5a60369e3c38558f32ebc (patch)
tree1e027c6f34c35c79a37a5c58be7df947abae849b
parentf371e977a5db9dd02496fb38a37776cd1aa534af (diff)
downloadtour-dd37de88a2e87cabd2f5a60369e3c38558f32ebc.tar.gz
*
-rw-r--r--js/MAP.md1
-rw-r--r--js/bookmarklets/a11y.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/js/MAP.md b/js/MAP.md
index a766176..7de3f62 100644
--- a/js/MAP.md
+++ b/js/MAP.md
@@ -6,6 +6,7 @@
 - `bird-words`, an exploration of Markov chain generation, sort of migrated to
   <https://git.sr.ht/~eli_oat/beak>
 - `blototboot`, irc bot and broken lisp interpreter
+- `bookmarklets`, misc. bookmarklets for stuff and things
 - `canvas`, an exploration of the HTML canvas, lets you move a little sprite
   around a canvas
 - `dither`, Floyd-Steinberg dithering
diff --git a/js/bookmarklets/a11y.js b/js/bookmarklets/a11y.js
new file mode 100644
index 0000000..b05ae71
--- /dev/null
+++ b/js/bookmarklets/a11y.js
@@ -0,0 +1 @@
+javascript:(function(){if(window.focusHighlighter){console.log('Focus highlighter already active.');return;}window.focusHighlighter=true;const style=document.createElement('style');style.id='focus-highlighter-style';style.textContent='.focus-highlight{outline:2px solid red !important;outline-offset:2px !important;}';document.head.appendChild(style);function handleFocus(event){document.querySelectorAll('.focus-highlight').forEach(el=>el.classList.remove('focus-highlight'));if(event.target){event.target.classList.add('focus-highlight');console.log('Focused Element:',event.target);console.log('Tag Name:',event.target.tagName);console.log('Attributes:',Array.from(event.target.attributes).map(attr=>`${attr.name}="${attr.value}"`).join(', '));console.log('Accessible Name:',event.target.getAttribute('aria-label')||event.target.textContent.trim());}}window.addEventListener('focusin',handleFocus);console.log('Focus highlighter activated. Click the bookmarklet again to deactivate.');})();
\ No newline at end of file