Last active
March 23, 2026 00:53
-
-
Save stephenquan/7a152969372ccb8c8a0ad44b7b8ab55e to your computer and use it in GitHub Desktop.
wordle_accessibility.js
This file contains hidden or 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
| (function () { | |
| const style = document.createElement('style'); | |
| style.textContent = ` | |
| /* Ensure we have an anchor for the badge */ | |
| [data-state="correct"], | |
| [data-state="present"], | |
| [data-state="absent"] { | |
| position: relative !important; | |
| } | |
| /* Common badge styling */ | |
| [data-state="correct"]::after, | |
| [data-state="present"]::after, | |
| [data-state="absent"]::after { | |
| position: absolute; | |
| right: 6px; | |
| bottom: 4px; | |
| font-size: 1.3rem; | |
| font-weight: 900; | |
| line-height: 1; | |
| color: white; | |
| pointer-events: none; | |
| text-shadow: 0 1px 2px rgba(0,0,0,0.35); /* improves contrast on lighter tiles */ | |
| } | |
| /* Symbols */ | |
| [data-state="correct"]::after { content: "✓"; } | |
| [data-state="present"]::after { content: "•"; font-size: 1.6rem; } /* dot needs to be slightly larger */ | |
| [data-state="absent"]::after { content: "×"; } | |
| `; | |
| document.head.appendChild(style); | |
| document.title = "Wordle (color patched)"; | |
| })(); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist improves Wordle’s accessibility for people with color‑vision differences by adding symbol annotations that indicate “correct,” “present,” or “absent” guesses.
To test:
To create a bookmark: