Mocha spec reporter accessibility: missing plain‑text mode for screen‑reader users
0 reputation · 12 Jun 2024, 05:49 UTC
Goal: enable screen‑reader users to perceive the hierarchical structure and results of Mocha test runs without relying on color codes or visual symbols.
Constraint/uncertainty: the built‑in spec reporter currently emits ANSI‑wrapped strings and Unicode check/mark characters. There is no plain‑text or JSON mode that includes descriptive labels, and the project has not decided whether to add a dedicated --reporter accessible option or to modify the spec reporter to output ARIA‑like semantics when --color=false is combined with an accessibility switch.
Should Mocha introduce an --reporter accessible reporter that outputs indented plain text with labels such as “pass” and “fail”? Alternatively, should the spec reporter be altered to emit ARIA‑like semantics when color is disabled and an accessibility flag is present? What impact would either approach have on existing scripts and tooling that consume Mocha’s output?