microsoft / microsoft/TypeScript

Avoid using just color to distinguish markers in type compatibility chart (WCAG 1.4.1)

Abierto
#56,947 0 comentarios 4 reacciones 1 asignado Ver en GitHub

@navya9singh ya está trabajando en esto.

Desde el 4/1/2024.

Website
Lenguaje dominante
Go
Estrellas
111k
Forks
14.4k
Merge medio
1 d 19 h
PR fusionados (30 d)
117

Descripción

Acknowledgement
  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.
Comment

In the handbook section any, unknown, object, void, undefined, null, and never assignability, the chart uses just color to differentiate checkmarks:

  1. A blue (class blue-tick) for a combination that's assignable regardless of strictNullChecks
  2. A green (class black-tick [sic]) for a combination that's only assignable when strictNullChecks is off
  3. A lighter blue (via inline style) for the intersection of any and unknown

It's really subtle and hard to see even with "normal" color vision, let alone for people with color blindness. (People who are red-green color blind -- the most common kind -- "...tend to confuse purple, blue, green, orange, and red...." source.) See also WCAG Success Criterion 1.4.1: "Color is not used as the only visual means of conveying information..."

For (2) above, I suggest using a different marker entirely, perhaps one of: * . Or alternatively, perhaps a combination like ✓? or ✓‡. (The text above explaining about the special checkmarks would also need to be changed to match.)

For (3) above, the text doesn't call out why that intersection is different from others, so I suggest the inline style could just be removed. If the distinction is important, though, it could be another marker.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.