-
Notifications
You must be signed in to change notification settings - Fork 0
🎨 Palette: Add accessibility contexts to Writing Pad tools #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RileyTheRiler
wants to merge
1
commit into
main
Choose a base branch
from
palette/writing-pad-a11y-13041229929443143392
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: RileyTheRiler/French-Game
Length of output: 1389
🌐 Web query:
Tailwind CSS v4 outline-none vs outline-hidden forced-colors HCM💡 Result:
In Tailwind CSS v4, the key difference is how the utilities behave under forced colors mode (CSS
@media (forced-colors: active)). 1)outline-hidden- Tailwind docs describe it as “hide the default browser outline on focused elements, while still preserving the outline in forced colors mode” [1]. - Mechanically, it makes the outline style effectively “hidden” by default in normal rendering, but in forced-colors it still allows focus indication instead of fully removing it (Tailwind’s docs and the original PR explain this accessibility goal) [1][2]. 2)outline-none- In v4, Tailwind has a simplifiedoutline-nonewhich setsoutline-style: none(i.e., it truly removes the outline style, rather than leaving an invisible outline that could appear in forced colors) [2][3]. - Consequently,outline-nonewill remove the default outline even in forced colors scenarios where you’d otherwise want the browser to still indicate focus [1][2]. Practical takeaway for “HCM” (high contrast / forced colors): - Preferoutline-hiddenwhen you want to suppress the default focus outline for most users but still retain focus visibility for high-contrast / forced-colors users [1]. - Useoutline-noneonly if you intentionally want to remove the outline entirely, knowing that forced-colors focus visibility may be impacted [2][3]. If you’re upgrading from Tailwind v3: - The Tailwind team renamed the old behavior by moving the v3-style “don’t fully remove outline; keep it for forced colors” intooutline-hidden, and added a newoutline-nonethat matches the intuitive “set outline-style: none” expectation [2][3].Citations:
outline-nonewithoutline-hidden, add newoutline-nonetailwindlabs/tailwindcss#14926🌐 Web query:
Tailwind CSS v4 upgrade codemod outline-none outline-hidden💡 Result:
Tailwind CSS v4 upgrade codemod: it should rename outline-none to outline-hidden. What the upgrade is supposed to do - Tailwind’s official upgrade guide says to replace any usage of
outline-nonewithoutline-hiddenwhen migrating to v4 (including variants likefocus:outline-none→focus:outline-hidden) [1]. - The rationale is thatoutline-nonepreviously didn’t actually setoutline-style: noneand instead produced an invisible outline to keep it visible in forced-colors mode for accessibility; Tailwind renamed it tooutline-hiddenand introduced a newoutline-nonethat truly setsoutline-style: none[1]. How the codemod behaves (evidence from implementation + community reports) - A Tailwind v3→v4 codemod repository documents the “Outline Migration” mapping across all variants, includingoutline-none→outline-hiddenandfocus:outline-none/focus-visible:outline-nonevariants [2]. - Tailwind issue discussion confirms the intended behavior: the upgrade guidance maps tooutline-hiddenfor accessibility in forced-colors mode, whileoutline-noneexists in v4 to actually remove the outline (outline-style: none) [3]. - Some third-party codebases have observed cases where not alloutline-noneusages were migrated, indicating this rename is a common codemod expectation but can depend on how/what the upgrade tool scans and applies [4]. Recommended search/verification step in your codebase - After running the upgrade, verify whether any legacy utility remains: - grep foroutline-noneand ensure it’s been replaced withoutline-hiddenwhere appropriate [1]. How to run the official upgrade codemod (high level) - Tailwind’s v4 upgrade tool is provided as@tailwindcss/upgradeand is run vianpx@tailwindcss/upgrade`` [5] / [6].Citations:
outline-hiddenonly applies transparent outline whenforced-colorsis active? tailwindlabs/tailwindcss#16926Use
focus-visible:outline-hiddeninstead offocus-visible:outline-nonefor Windows High Contrast Mode compatibilityIn Tailwind CSS v4,
outline-nonesetsoutline-style: noneand does not preserve the transparent outline that enables focus visibility under@media (forced-colors: active)(Windows High Contrast Mode).outline-hiddenproduces the same visual result in standard rendering but additionally preserves a visible outline in forced-colors mode. The official Tailwind v4 upgrade guide explicitly mapsoutline-none→outline-hiddenfor this reason.Since this PR specifically targets accessibility, this affects HCM users on both button groups.
♿ Proposed fix for both button groups
Apply the same change to the stroke width buttons (line 467).
Also applies to: 467-467
🤖 Prompt for AI Agents