Skip to content

feat: add accessibilityDisplayShouldDifferentiateWithoutColor on macOS#49912

Merged
jkleinsc merged 1 commit intoelectron:mainfrom
robb:robb/accessibilityDisplayShouldDifferentiateWithoutColor
Mar 20, 2026
Merged

feat: add accessibilityDisplayShouldDifferentiateWithoutColor on macOS#49912
jkleinsc merged 1 commit intoelectron:mainfrom
robb:robb/accessibilityDisplayShouldDifferentiateWithoutColor

Conversation

@robb
Copy link
Copy Markdown
Contributor

@robb robb commented Feb 23, 2026

Description of Change

Adds nativeTheme.shouldDifferentiateWithoutColor on macOS that maps to the accessibilityDisplayShouldDifferentiateWithoutColor property on NSWorkspace. If true, the user has indicated that they prefer UI that differentiates items with something other than color alone. This is useful for users with color vision deficiency.

For example, an app like Linear might use this to automatically show diffs in a way that that deemphasizes usage of red and green to indicate removals and additions.

A somewhat equivalent media query has been discussed, fwiw: w3c/csswg-drafts#10335

Checklist

Release Notes

Notes: Added nativeTheme.shouldDifferentiateWithoutColor on macOS

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Feb 23, 2026
@codebytere
Copy link
Copy Markdown
Member

@robb can you please sign your commit?

@codebytere codebytere self-requested a review February 23, 2026 13:03
@robb robb force-pushed the robb/accessibilityDisplayShouldDifferentiateWithoutColor branch from b0719da to 7ec4bd3 Compare February 23, 2026 13:26
@robb
Copy link
Copy Markdown
Contributor Author

robb commented Feb 23, 2026

@codebytere There you go

@codebytere codebytere added semver/minor backwards-compatible functionality target/41-x-y PR should also be added to the "41-x-y" branch. labels Feb 23, 2026
codebytere
codebytere previously approved these changes Feb 23, 2026
Copy link
Copy Markdown
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

Copy link
Copy Markdown
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

Copy link
Copy Markdown
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes more sense to put this in nativeTheme but I'll defer to @codebytere if there is a reason this belongs in systemPreferences vs nativeTheme.

@codebytere codebytere dismissed their stale review February 26, 2026 21:03

@jkleinsc you're correct - this should be moved to nativeTheme.

@robb
Copy link
Copy Markdown
Contributor Author

robb commented Feb 28, 2026

Cool, I'll move it over when I'm back in the office on Monday.

@robb robb force-pushed the robb/accessibilityDisplayShouldDifferentiateWithoutColor branch from 7ec4bd3 to 0b2b5b9 Compare March 3, 2026 12:52
@robb
Copy link
Copy Markdown
Contributor Author

robb commented Mar 3, 2026

nativeTheme.shouldDifferentiateWithoutColor it is

@robb robb requested review from codebytere and jkleinsc March 3, 2026 12:53
Copy link
Copy Markdown
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

@robb
Copy link
Copy Markdown
Contributor Author

robb commented Mar 6, 2026

Let me know if there's something on my end to get this unstuck but fwict it's a CI-side issue?

@codebytere
Copy link
Copy Markdown
Member

@robb could you please rebase? sorry for the delay here!

@robb robb force-pushed the robb/accessibilityDisplayShouldDifferentiateWithoutColor branch from 9e56bec to 5f325d3 Compare March 12, 2026 14:40
@robb
Copy link
Copy Markdown
Contributor Author

robb commented Mar 12, 2026

@codebytere No worries, hope this worked.

@github-actions github-actions bot added the target/42-x-y PR should also be added to the "42-x-y" branch. label Mar 13, 2026
@jkleinsc jkleinsc added target/41-x-y PR should also be added to the "41-x-y" branch. and removed target/41-x-y PR should also be added to the "41-x-y" branch. labels Mar 19, 2026
@jkleinsc jkleinsc changed the title feat: add accessibilityDisplayShouldDifferentiateWithoutColor on macOS feat: add accessibilityDisplayShouldDifferentiateWithoutColor on macOS Mar 19, 2026
@jkleinsc jkleinsc changed the title feat: add accessibilityDisplayShouldDifferentiateWithoutColor on macOS feat: add accessibilityDisplayShouldDifferentiateWithoutColor on macOS Mar 19, 2026
Adds nativeTheme.shouldDifferentiateWithoutColor on macOS that maps to
NSWorkspace.accessibilityDisplayShouldDifferentiateWithoutColor. If true,
the user has indicated that they prefer UI that differentiates items with
something other than color alone. This is useful for users with color
vision deficiency.
@jkleinsc jkleinsc force-pushed the robb/accessibilityDisplayShouldDifferentiateWithoutColor branch from 5f325d3 to b390209 Compare March 20, 2026 13:55
@jkleinsc jkleinsc merged commit dee8f5a into electron:main Mar 20, 2026
244 of 253 checks passed
@welcome
Copy link
Copy Markdown

welcome bot commented Mar 20, 2026

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Mar 20, 2026

Release Notes Persisted

Added nativeTheme.shouldDifferentiateWithoutColor on macOS

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Mar 20, 2026

I have automatically backported this PR to "41-x-y", please check out #50408

@trop trop bot added in-flight/41-x-y and removed target/41-x-y PR should also be added to the "41-x-y" branch. labels Mar 20, 2026
@trop
Copy link
Copy Markdown
Contributor

trop bot commented Mar 20, 2026

I have automatically backported this PR to "42-x-y", please check out #50409

@trop trop bot added in-flight/42-x-y merged/42-x-y PR was merged to the "42-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. and removed target/42-x-y PR should also be added to the "42-x-y" branch. in-flight/42-x-y in-flight/41-x-y labels Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review/approved ✅ merged/41-x-y PR was merged to the "41-x-y" branch. merged/42-x-y PR was merged to the "42-x-y" branch. semver/minor backwards-compatible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants