microsoft / microsoft/TypeScript
Avoid using just color to distinguish markers in type compatibility chart (WCAG 1.4.1)
@navya9singh arbeitet bereits daran.
Seit 04.1.2024.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
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:
- A blue
✓(classblue-tick) for a combination that's assignable regardless ofstrictNullChecks - A green
✓(classblack-tick[sic]) for a combination that's only assignable whenstrictNullChecksis off - A lighter blue
✓(via inline style) for the intersection ofanyandunknown
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.