fix(accessibility): preserve forced-colors state cues - #151
Draft
seonghobae wants to merge 10 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
Implement issue #150 as a bounded forced-colors/high-contrast accessibility slice without changing Inkspan's normal light/dark theme behavior or host authority boundaries.
Exact test-first lineage
main@50ac98cfa0ad9e8dd75f93ca437a5679fed4d804.d89bd41dabca47a00d486e847eed0d3df8b5456b. Exact CI run31412302233, build-and-test job93533014788, checked out that head and proved the missing forced-colors system-state mappings.23a24f5f20475543e51c97a83a5dc7fc08db9ddbmade the requested system-color/browser contract green, but a later audit found the authored@media (forced-colors: active)overrides were split before later equal-specificity base rules, leaving a real CSS-cascade regression risk.bcd993a1d521d3f44fe07eaeaa5acda10dce3d6bchanged onlysrc/forcedColorsStyles.test.ts. Exact CI run31416835830, build-and-test job93547761779, checked out that head and failed the intended boundary because two screen forced-colors blocks existed.bd109253141bcda7b0514de95d25f43ee2710602consolidated the screen forced-colors overrides after the normal screen state rules. Its browser/Office/security/SAST jobs passed, while CI run31417191422exposed a test-scoping defect: the order assertion counted later@media printselectors that cannot override screen forced-colors behavior.940c2e1341ad46c66f1cdc4cfab3603fd7dfc1aacorrectly excluded print media but still counted selectors inside the forced-colors block itself. Exact CI run31417569588, build-and-test job93550088295, failed only that over-broad assertion while the other 825 tests passed.862db1d4ec2f910fcc65dbd3aabdfcd49877d98d. The final contract identifies the balanced forced-colors media block, requires relevant base screen selectors before it, and rejects matching normal screen rules after it without confusing forced-colors or print declarations.Implemented boundary
Inside one final screen
@media (forced-colors: active)layer, Inkspan uses CSS system colors to preserve editor/container boundaries, toolbar and collaboration status chrome, toolbar grouping, keyboard focus, active and disabled control states, authored document links, blockquote/placeholder cues, code/pre/table borders, and collaboration cursors. Disabled buttons no longer rely on opacity as their forced-colors state cue. Normal light/dark theme declarations remain unchanged outside that media query, and Inkspan does not opt out of user-agent forced-color adjustment.The deterministic stylesheet contract now also guards cascade placement.
tests/browser/specs/forced-colors.browser.spec.tssupplies network-blocked real-engine evidence via Playwright forced-colors emulation for media activation, keyboard focus, disabled-state opacity, structural borders, underlined links, collaboration cursor/label visibility, and the editable document surface's own focus-visible outline.The slice adds no persistence, transport, credentials, model use, authorization, tenant, network, provider, room, or durable-audit authority.
Exact-head evidence
For unchanged exact head
862db1d4ec2f910fcc65dbd3aabdfcd49877d98d:31417814093: success;31417815005: success;31417814222: success;Release dependency
Issue #118 still owns the exact 0.6.0 stable-candidate operational boundary. Keep this PR Draft and unmerged until that release boundary closes; moving protected
mainfirst would invalidate the current stable-candidate identity required by the protected release workflow. After #118 closes, refetch the then-current protected tip, reacquire live-base ancestry and exact-head gates, reconcile canonical next-release documentation/traceability, and only then evaluate Ready/merge status.