Fix A11y - reading diff lines

Recent chrome release 102 changed a way how to build A11y tree. This
caused a high priority regression - no more reading of diff files by
screen reader. Making a row aria role button enable to build a11y tree
and screenreader (Voiceover) is reading line by line again.

Release-Notes: skip
Google-Bug-Id: b/234832728
Change-Id: Id6234097f1f28c21f4c9322dd6fffd24aae28489
diff --git a/polygerrit-ui/app/embed/diff/gr-diff-builder/gr-diff-builder-side-by-side.ts b/polygerrit-ui/app/embed/diff/gr-diff-builder/gr-diff-builder-side-by-side.ts
index c982e2b..314b96b 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff-builder/gr-diff-builder-side-by-side.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff-builder/gr-diff-builder-side-by-side.ts
@@ -99,6 +99,9 @@
     row.setAttribute('right-type', rightLine.type);
     // TabIndex makes screen reader read a row when navigating with j/k
     row.tabIndex = -1;
+    // This is small hack to enable screen reader to read a row
+    row.setAttribute('role', 'button');
+    row.setAttribute('aria-roledescription', 'Code line');