Provide accessible text for diff line links
In the current implementation of diffs, as well as in Rapid Diffs, the line links have text displayed in the content of :before pseudo-element take from data-linenumber attribute on the anchor tag. This violates WCAG as the text is not accessible to AT.
| current diffs | Rapid Diffs |
|---|---|
![]() |
![]() |
This could be fixed two ways:
- refactoring the
:beforesolution to include the line number in the actual anchor tag - have an enhanced solution for assistive technologies by placing the line numbers inside the anchor tag and hiding for from sighted users BUT providing some extra context. It could be something around
Previously line number [line_number]andNow line number [line_number].
Remove 'link-name' from skipped rules in accessibility test case, to verify the change is compliant.
Test file:
Edited by Paulina Sedlak-Jakubowska

