Actions on several lines
Hello accessibility team,
On Github, recently some actions on several lines at once have become available. For instance, a reviewer may select several lines and put a comment related to all of them; or to add a suggestion related to several lines at once to remove clutter in the commits by making commits number lower.
As for now, this functionality is not accessible with screen readers.
There are at least two possibilities on how to implement that:
1. (Better) Make line numbers clickable toggle buttons or links. Scenario: When a screen reader user puts his/her cursor on the line number, screen reader announces, for example: "10 toggle button". Here, the line number is given the ARIA role of "button" and the aria-pressed attribute is set to "false". If the user clicks the button (presses Enter or Space), the line gets selected visually, and the aria-pressed attribute is set to "true".
2. (Worse). The same thing as above, but there is a dedicated "Select Line" button, either visually visible or hidden (1 by 1 px since "display:none" is correctly processed by screen readers and not shown in the virtual DOM).
Thanks for sharing this feedback with us on Github Andre. We will make sure to share this with our engineering team. Please continue to leave your feedback here and upvote posts that you agree with.