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

Colour selections fail accessibility guidelines #3828

Open
5 tasks done
papadeltasierra opened this issue Oct 9, 2023 · 9 comments
Open
5 tasks done

Colour selections fail accessibility guidelines #3828

papadeltasierra opened this issue Oct 9, 2023 · 9 comments
Assignees
Labels
Area-Accessibility Label for issues related to accessibility problems or improvements Needs-Triage 🔍 It's a new issue that core contributor team needs to triage.

Comments

@papadeltasierra
Copy link

Prerequisites

Steps to reproduce

PowerShell 7.3.7. Use some commands and trigger "hint" text. For example see the image below:

image

As someone who is slightly colourblind, I can barely see the help text and it certainly does not pass accessibility guidelines according to Accessibility Insights for Windows.

I have tried changing the colour scheme but they all seem to suffer from similar issues and I could not find one that made all the test have a good contrast.

Expected behavior

Text should all be easily readable, albeit perhaps with a need to select a "high contrast" colour scheme.

Actual behavior

Various different text colours, of which the help text is one example, are hard if not impossible to read.

Error details

None.

Environment data

PS > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.7
PSEdition                      Core
GitCommitId                    7.3.7
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS >

Visuals

image

@237dmitry
Copy link

237dmitry commented Oct 9, 2023

I have tried changing the colour scheme

I think you can change PSReadline options:

Get-PSReadlineOption
Set-PSReadlineOption -Color @{

  ListPrediction = "Green"       
  ListPredictionSelected = "Red"
  ListPredictionTooltip = "`e[38;5;95m"
}

Any colors. The example colors is just example.

@papadeltasierra
Copy link
Author

@237dmitry Thank you so much! Excellent tip! Doesn't let MS off the hook for not having a default accessibility compatible scheme of course but does help work around it ;-).

@SteveL-MSFT SteveL-MSFT transferred this issue from PowerShell/PowerShell Oct 9, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Oct 9, 2023
@StevenBucher98 StevenBucher98 added the Area-Accessibility Label for issues related to accessibility problems or improvements label Oct 9, 2023
@daxian-dbw
Copy link
Member

daxian-dbw commented Oct 9, 2023

@papadeltasierra Can you please upgrade to v2.3.4 of PSReadLine? We updated the default inline prediction color to provide more contrast, and I'd love to know how that works for you.

To upgrade, simply run this command:
Install-Module -Name PSReadLine -Repository PSGallery -Scope CurrentUser -RequiredVersion 2.3.4 -Force

@StevenBucher98 StevenBucher98 removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Oct 9, 2023
@papadeltasierra
Copy link
Author

Sorry, didn't spot the prompt for feedback in amongst all the other GitHub SPAM I received from Microsoft. I did the upgrade but the colours appear to be identical, in fact it backed out my change to the prediction colour setting and set if back to the unreadable pale colour. Microsoft has some open-source tools that check for accessibility (in this case mainly contrast that I tried against some of the colours and let's just say the tool was not impressed.

@papadeltasierra
Copy link
Author

Also don't see the "Reopen Issue" button on this page - is it disabled?

@daxian-dbw daxian-dbw reopened this Oct 17, 2023
@daxian-dbw
Copy link
Member

daxian-dbw commented Oct 17, 2023

@papadeltasierra thanks for replying back. Can you please share your changes to the prediction color setting, so that we know what color settings work for you?

@daxian-dbw daxian-dbw added Needs-Author Feedback Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Oct 17, 2023
@papadeltasierra
Copy link
Author

The one I used was this:

InlinePredictionColor : "e[97;2;3m"`

It is the same as ListPredictionTooltipColor but I can live with that.

I do appreciate that it can be nice to have colours but colours are one of the things I hate most about people doing helpful things to Linux consoles for example. They often enable colours without realising that colourblind folk sometimes cannot read the new colours text. The Microsoft tools seem to be quite good at making a decision as to what colour combinations will work and which won't and if you are able to access it, the https://accessibilityinsights.io/ tool can check all the colours for you (you might have to do this one by one) and give you a idea of what is good, or not. I ran it by running Get-PSReadLineOption and then checking some of the example coloured text to get an idea of what it thought. Maybe you just need "black-and-white" , and one or more colour blind options for the colour palates. Apparently there are at least three different types so I might not be red/green colourblind, but just reduced red or reduce green! https://www.colourblindawareness.org/colour-blindness/types-of-colour-blindness/. There are also tools that fiddle with display colours to simulate colourblindness for regular folk, which are fun to use to show regular folk why that lovely green/red pattern map they have created is just a solid grey blob to some users :-).
Thanks for taking an interest in this.
Paul DS

@daxian-dbw
Copy link
Member

@papadeltasierra Thank you so much for your detailed reply! Accessibility is of high importance to us and admittedly, we are not doing very good about it in PSReadLine today. The information you provided here will be very helpful to us.

BTW, you mentioned that the inline prediction color works for you is e[97;2;3m, but that's exactly the default color for InlinePredictionColor in v2.3.4 version of PSReadLine. Does that mean the default inline prediction color in v2.3.4 works better for you? (of course, this by no means satisfies the accessiblity requirement. like you said, we should have a color theme or themes for colorblind users)

@papadeltasierra
Copy link
Author

papadeltasierra commented Oct 19, 2023

Sorry, looks like I somehow lost my change. Fortunately I was able to find the history and the selection I went with was "`e[96m`e[48;5;238m" Somewhat garish to many eyes I suspect but my wife will attest that my choice of colours is not to everyone's taste ;-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Label for issues related to accessibility problems or improvements Needs-Triage 🔍 It's a new issue that core contributor team needs to triage.
Projects
None yet
Development

No branches or pull requests

4 participants