Skip to content

[Epic] Improved High Contrast support #12999

Open

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Apr 29, 2022
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Apr 29, 2022
  3. added and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    Needs-Tag-FixDoesn't match tag requirements
    on Apr 29, 2022
  4. changed the title [-]<Reserved for future use>[/-] [+][Epic] Improved High Contrast support[/+] on May 9, 2022
  5. carlos-zamora commented on Oct 27, 2022

    @carlos-zamora

    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.
  6. added
    A11yWCAGAccessibility tracking
    HCL-E+DAccessibility tracking
    A11ySev3Accessibility tracking
    and removed
    A11yWCAGAccessibility tracking
    on Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions