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

address accessibility story #28

Closed
Tracked by #10
zkat opened this issue Aug 21, 2021 · 2 comments
Closed
Tracked by #10

address accessibility story #28

zkat opened this issue Aug 21, 2021 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zkat
Copy link
Owner

zkat commented Aug 21, 2021

How accessible are these errors? What changes could be made to make them easier to consume for visually impaired folks? We should have a reasonable story for this before 1.0 goes out. Right now, I don't imagine it's very useful to get these error messages.

@zkat zkat added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Aug 21, 2021
@zkat zkat mentioned this issue Aug 21, 2021
12 tasks
@Mythra
Copy link

Mythra commented Aug 21, 2021

Hi!

Figured I'd leave my thoughts on the matter, as I also have some very similar errors for a tool I've been working on, and am a screenreader/braille display user myself. FWIW a fully 'colored' error of my tool looks incredibly similar to miette as it was inspired by orogene:

A serialization error reading, pyra::serialization::syntax: extra trailing comma, Source Data: /home/cynthia/.config/pyra/fetch-credentials.json:4:41. Line 4 has a error diagnostic that an extra trailing comma was found.

So hopefully this isn't too far off from miette. Most terminals don't really have a good story here, so the best bet is generally to offer options:

  1. For color there is a standard CLICOLOR= variable that can be set to 1, or 0. It can be really wanting to setup some sort of 'color-blind' friendly colors, but this is pretty diminishing return as there are still lots of terminals like it or not that only have 16 color choices. I've found creating color-blind friendly variants in being unstandard, and small returns to not really be worth it (how many people are going to know a tool was built with miette, and to use: MIETTE_A11Y_MODE="red_green_unclear" to know to distinguish reds/greens a bit more, and is using a terminal where it'll actually do something because you have a wide range of colors?).

  2. The best thing besides a color variant for screenreader users, I've found is to offer separate output modes that can be configured similar to how a user would expect with log formatting. I recommend having:

  • A 'fancy' output format with/without colors where you show the nice multiline that is easier for people to read.
  • A 'condensed' output format where more things are based on lines of information (this makes it simple for people like me who will be using a braille reader on a terminal -- e.g. OSX voiceover on terminal is pretty atrocious so it's just easier to use my braille reader there).
  • A machine parseable (json is probably easiest because jq is a very easy tool to get) format that is well split up so a custom set of information can be extracted easily. Knowing I can just pipe all output to a file, and then use jq to get just what I care about later is honestly the easiest way to make sure I'm never blocked.

@zkat
Copy link
Owner Author

zkat commented Aug 21, 2021

Thanks for your comment! This is super useful. The route I've ended up taking so far is to use NO_COLOR and some heuristics to figure out whether to do any fancy stuff, so it's very clear and easy how to opt out of it, and it applied globally! It does mean that it's a bit all-or-nothing, but I got some feedback that relying on more bespoke or obscure env vars might make it harder to discover? In any case, I definitely want the "narrated" output to be readable (and hearable), so I think turning NO_COLOR into a big hammer by default is ok?

re: CLICOLOR: I didn't know about that one! I'll be sure to add support for that alongside NO_COLOR.

Finally, 🤔 about it a machine-parseable version sounds really cool. I've created a separate tracking issue for that bit, because this issue is more about "human" output: #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants