Title: Add an "Increase contrast" accessibility setting to Appearance by DragonnZhang · Pull Request #67 · modelstudioai/openwork · GitHub
Open Graph Title: Add an "Increase contrast" accessibility setting to Appearance by DragonnZhang · Pull Request #67 · modelstudioai/openwork
X Title: Add an "Increase contrast" accessibility setting to Appearance by DragonnZhang · Pull Request #67 · modelstudioai/openwork
Description: What & why Adds an "Increase contrast" toggle to Settings → Appearance → Interface, directly below the existing Reduce motion toggle — its natural accessibility companion. Increasing contrast is a standard desktop control (macOS Accessibility → Increase contrast, Windows contrast themes, VS Code's High Contrast themes) that OpenWork lacked. OpenWork's borders, dividers, input outlines and secondary/"muted" text are intentionally very low-alpha (--border is oklch(from var(--foreground) l c h / 0.05), --muted-foreground is a 50% mix), which is hard to read for low-vision users and in bright environments. Closes #66. How it works (frontend-only, no backend) Mirrors the merged Reduce motion feature end-to-end: Preference persisted in localStorage under craft-high-contrast (new key in lib/local-storage.ts). HighContrastProvider context (context/HighContrastContext.tsx), wired in main.tsx beside ReduceMotionProvider. It reflects the pref as data-high-contrast="true" on . CSS in index.css gated on :root[data-high-contrast='true'] raises the contrast of the theme tokens — strengthening --border, --input, --muted-foreground, --foreground-dimmed and the focus --ring, plus a visible :focus-visible outline. Every theme derives those tokens from --foreground (which flips per light/dark), so the alpha-based overrides work in both light and dark and across preset themes. The theme system injects colors as a plain :root { … } rule, so the higher-specificity :root[data-high-contrast='true'] selector wins without !important. Toggle added to AppearanceSettingsPage (Interface section), off by default. i18n: 2 new keys (settings.appearance.increaseContrast / …Desc) across all 7 locales. Verification (DoD) bun run typecheck:all — zero delta vs main (apps/electron carries 11 pre-existing errors — vitest/auto-update.ts — byte-identical set on both branches; packages/ui and all other packages clean). bun test — zero delta vs main: 3578 pass, 56 fail — the identical pre-existing 56-failure set (diff of failing-test names is empty). bun run lint:i18n:parity — OK (1546 keys each; +2 in every locale). Renderer build (electron:build:renderer) — succeeds; verified the rule survives PostCSS/Tailwind into apps/electron/dist/renderer/assets/index-*.css: [data-high-contrast=true]{--hc-enabled:1;--border:oklch(from var(--foreground) l c h/.28); …} plus the :focus-visible outline. CDP assertion e2e/assertions/high-contrast.assert.ts drives the real UI in the draft/no-session state (no backend): opens Settings → Appearance, flips the toggle, and asserts the switch's aria-checked, the data-high-contrast attribute on , the persisted localStorage value, and that the CSS actually applied (a --hc-enabled marker computes to 1 on :root) — toggling twice to prove it applies and reverts. It follows the merged reduce-motion assertion pattern. Could not execute the CDP run in this environment: launching Electron requires downloading the Electron binary, which the sandbox's egress policy blocks (HTTP 403 on the Electron download host) — the same environment limitation documented on the merged Reduce motion PR (#51). Everything that does not need the Electron binary (typecheck, tests, i18n parity, renderer bundle) passes. Scope Frontend/renderer only — no qwen-code backend changes. Generated by Claude Code
Open Graph Description: What & why Adds an "Increase contrast" toggle to Settings → Appearance → Interface, directly below the existing Reduce motion toggle — its natural accessibility companion. Increasing ...
X Description: What & why Adds an "Increase contrast" toggle to Settings → Appearance → Interface, directly below the existing Reduce motion toggle — its natural accessibility companion....
Opengraph URL: https://github.com/modelstudioai/openwork/pull/67
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c065d810-13fb-627a-c2f8-32b1dbea7cd2 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 94C8:281FF8:4C2434:672B57:6A5278EE |
| html-safe-nonce | 8a8cb6f53d7a87b42d04bd3d70795c7846c01d5f1d61d6ddf279eaab9cba5de2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEM4OjI4MUZGODo0QzI0MzQ6NjcyQjU3OjZBNTI3OEVFIiwidmlzaXRvcl9pZCI6IjE2ODkyMDg4ODY5NTM5MzMwMzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 21755938d62dc97234f124ac0240d20ca627070154509908aae88e07afe496c5 |
| hovercard-subject-tag | pull_request:4007255540 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelstudioai/openwork/pull/67/files |
| twitter:image | https://avatars.githubusercontent.com/u/52599892?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/52599892?s=400&v=4 |
| og:image:alt | What & why Adds an "Increase contrast" toggle to Settings → Appearance → Interface, directly below the existing Reduce motion toggle — its natural accessibility companion. Increasing ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelstudioai/openwork git https://github.com/modelstudioai/openwork.git |
| octolytics-dimension-user_id | 283556804 |
| octolytics-dimension-user_login | modelstudioai |
| octolytics-dimension-repository_id | 1256697754 |
| octolytics-dimension-repository_nwo | modelstudioai/openwork |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1256697754 |
| octolytics-dimension-repository_network_root_nwo | modelstudioai/openwork |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width