fix(a11y): Add aria-label to `DiffStat`, use Tooltip
Created by: plibither8
This PR:
- Adds an
aria-label
to the diff stats'<div>
containing the diff line summary - Refactors
data-tooltip
toTooltip
in the same component
I chose to have the entire summary be read out instead of the just "29 lines changed"
to supply information at par with what a non-visually-impaired person would understand by seeing the diff squares too.
Closes #35535 (closed)
Test plan
- Tested using a screen reader, focussing on the diff header now properly reads out the entire summary (
"16 additions, 3 changes, 7 deletions"
) before reading the file name. - The Jest snapshots have been updated to reflect the changes.
App preview:
Check out the client app preview documentation to learn more.