Skip to content
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

[Epic] Improved High Contrast support #12999

Open
7 of 10 tasks
zadjii-msft opened this issue Apr 29, 2022 · 2 comments
Open
7 of 10 tasks

[Epic] Improved High Contrast support #12999

zadjii-msft opened this issue Apr 29, 2022 · 2 comments
Assignees
Labels
A11yMAS Accessibility tracking Area-Accessibility Issues related to accessibility Disability-LowVision Accessibility tracking InclusionBacklog Accessibility tracking InclusionBacklog-Windows TerminalWin32 Accessibility tracking Issue-Scenario Product-Terminal The new Windows Terminal.
Milestone

Comments

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 29, 2022
@zadjii-msft zadjii-msft added ⛺ Reserved For future use and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 29, 2022
@carlos-zamora carlos-zamora changed the title <Reserved for future use> [Epic] Improved High Contrast support May 9, 2022
@carlos-zamora carlos-zamora added Area-Accessibility Issues related to accessibility Product-Terminal The new Windows Terminal. Issue-Scenario and removed ⛺ Reserved For future use labels May 9, 2022
@carlos-zamora carlos-zamora self-assigned this May 9, 2022
@zadjii-msft zadjii-msft added this to the Megathreads milestone May 9, 2022
@carlos-zamora carlos-zamora added InclusionBacklog Accessibility tracking InclusionBacklog-Windows TerminalWin32 Accessibility tracking A11yMAS Accessibility tracking Disability-LowVision Accessibility tracking InclusionCommitted-202207 Accessibility tracking labels Jun 6, 2022
@carlos-zamora carlos-zamora removed the InclusionCommitted-202207 Accessibility tracking label Aug 1, 2022
@carlos-zamora
Copy link
Member

There's been some discussion regarding enabling adjustIndistinguishableColors automatically when high contrast mode is enabled. Here's a relevant excerpt from an internal email thread:

Thanks for reaching out. Before we get further, let me caveat that I’m not the official accessibility champ here; I’m more an unofficial champ.

I think your plan of increasing the delta E threshold makes a lot of sense to me. High Contrast mode is first about being merely legible, and second about being beautiful, so I don’t think “quite strange” color combinations is a deal-breaker. If hot pink on navy blue is legible, then HC customers won’t complain about your poor taste 😉.

I’ll caveat that by saying that this isn’t at all how win32 apps work. In win32, when HC mode is enabled, the user selects a high contrast theme, which sets 4 colors: {foreground, background, highlight, alternate-highlight}. Ideally, the terminal would play along with win32 and also reduce everything to those 4 colors. But I can imagine that it would be difficult to classify arbitrary text into those 4 buckets, if the console application is itself setting a bunch of colors all over the place, and not giving you any metadata on “foreground” or “highlight”.

Like you and unlike win32, Edge is also playing the game of recoloring uncooperative websites. Its strategy is a little different from yours. Edge will delete most background images, force all background colors to the OS theme HC background color, force all text to the OS theme HC foreground color, and force all hyperlinks to the OS theme HC highlight color. I don’t know if a strategy like that would be useful with terminal apps. I’d say that Edge’s heuristics are about 95% successful, but there are still websites that Edge simply makes worse (e.g., it deletes a background image that was critical to understanding the website).

If you want to go further down this path, maybe you could invent some VT codes to inform well-meaning terminal apps about the HC theme, and allow them to opt-in to doing the right thing? (I imagine that pwsh.exe would be the only app ever to use these VT codes, but still having your shell adapt to your needs is a very good step.)

tldr:

  • Delta E can be used to solve the high contrast issue
  • Ideally, we'd respect the contrast theme in the Windows setting. This operates by representing all colors to the 4/5 theme colors
  • Edge approaches this differently by forcing everything to the contrast theme colors. We could try and do the same for Terminal.
  • Consider creating a VT sequence to inform the app of a the high contrast theme

My thoughts on the matter:

  • On one hand, I think we should match the OS contrast theme.
    • I like Edge's method of accomplishing this. Perhaps a heuristic we could use is something like, foreground and background map directly to HC.Foreground and HC.Background from the contrast theme. Hyperlinks and formatted text map to HC.highlight. Custom color overrides map to HC.alternate-highlight.
    • Personally, don't understand why a VT sequence would be needed for this? Curious how it differs and interacts with the one mentioned in Enable users to disable VT colors (for accessibility, visibility, contrast, etc.) #3066. This is just a lack of understanding on my part, don't mean anything by it haha.
  • On the other hand, WT allows users to apply different color schemes based on their session/profile, so adjustIndistinguishableColors + profile.colorScheme is a pretty cool way to provide that customizability to users.

@carlos-zamora
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A11yMAS Accessibility tracking Area-Accessibility Issues related to accessibility Disability-LowVision Accessibility tracking InclusionBacklog Accessibility tracking InclusionBacklog-Windows TerminalWin32 Accessibility tracking Issue-Scenario Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants