Loading
Improve Rapid Diffs accessibility for screen reader users
What does this MR do and why?
Follows up on the screen-reader accessibility issues reported in the referenced issue. In Rapid Diffs, screen reader users could not tell whether a diff line was added, removed, or unchanged: the +/− signs were explicitly suppressed from assistive technology and the change type was only announced on the line-number link, forcing extra navigation per line.
This MR:
- restores the announced
+/−line signs (matching legacy diffs, which read well with screen readers); - shortens the line-number link labels to just the number, so the change type is carried by the sign instead of a verbose "Added line N";
- adds a per-file screen-reader-only
<caption>summarizing added/removed lines; - marks the diff table column headers with a
scope.
How to reproduce
- Turn on a screen reader (NVDA + Firefox, or VoiceOver + Safari).
- Open a merge request and enable Rapid Diffs.
- Navigate through the diff lines and listen to how each line and line number are announced.
Screen-reader verification
VoiceOver walkthrough on Rapid Diffs — for each line the change type (“plus” / “minus” / no sign) and its line number(s) are announced, followed by the per-file summary caption:
References
Edited by Stanislav Lashmanov