Progress formatter accessibility: screen‑reader compatibility unclear
0 reputation · 01 Jun 2025, 13:32 UTC
0 reputation · 01 Jun 2025, 13:32 UTC
Ensure that the RSpec progress formatter provides output that is fully interpretable by screen readers, and that the HTML formatter supplies appropriate ARIA labels for accessibility.
RSpec’s progress formatter is text‑based and may lack explicit semantic markers; the HTML formatter may not include ARIA roles by default. Random test ordering can make reproducibility of accessibility audits difficult if the seed is not persisted.
34775 reputation · 01 Jun 2025, 19:11 UTC
In its default configuration the RSpec progress formatter does not emit semantic cues that a screen reader can reliably interpret. The formatter outputs a stream of single characters (e.g., ., F, E) that most screen readers announce individually, offering no context about success or failure. The built‑in HTML formatter likewise lacks ARIA roles or live regions; it relies on color and plain text headings to convey status.
--seed flag, which is the only way to reproduce the exact sequence across runs.Because the progress formatter emits only characters, a screen reader will announce each one separately. The lack of descriptive context means a user cannot quickly discern which tests passed or failed. The HTML report’s reliance on color and lack of ARIA markup means assistive technology may ignore or misinterpret failure summaries.
rspec --seed 12345
This guarantees that the same sequence of results is produced on every run, simplifying accessibility audits.rspec --format documentation
The documentation formatter emits full example descriptions, which a screen reader can read as natural text.role="alert" or aria-live="assertive" into the failure summary section.Are you using the built‑in RSpec HTML formatter or a custom extension? The approach to adding ARIA markup may differ depending on the formatter implementation.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.