Skip to content

Commit 83deacc

Browse files
committed
GitHub: When viewing the contents of a single file, ensure the table is never treated as a layout table even if there are only a few lines.
1 parent 320383f commit 83deacc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

GitHubA11yFixes.user.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ function onNodeAdded(target) {
4343
// Single commit.
4444
if (elem = target.querySelector(".commit-title"))
4545
makeHeading(elem, 2);
46+
} else if (res[1] == "blob") {
47+
// Viewing a single file.
48+
// Ensure the table never gets treated as a layout table.
49+
if (elem = target.querySelector(".js-file-line-container"))
50+
elem.setAttribute("role", "table");
4651
}
4752
if (["pull", "commit"].indexOf(res[1]) >= 0 && res[2] == "/") {
4853
// Pull request or commit.

0 commit comments

Comments
 (0)