From caed5c659231dc7b835bbf9fc87d4740447a73e1 Mon Sep 17 00:00:00 2001 From: derekriemer Date: Mon, 2 Jan 2017 19:05:25 -0700 Subject: [PATCH 1/2] Fix the broken table --- GitHubA11yFixes.user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GitHubA11yFixes.user.js b/GitHubA11yFixes.user.js index 7ca391e..3fdb383 100644 --- a/GitHubA11yFixes.user.js +++ b/GitHubA11yFixes.user.js @@ -104,9 +104,9 @@ function onNodeAdded(target) { onSelectMenuItemChanged(elem); } // Table lists; e.g. in issue and commit listings. - for (elem of target.querySelectorAll(".table-list,.Box-body")) - elem.setAttribute("role", "table"); - for (elem of target.querySelectorAll(".table-list-item,.Box-body-row")) + for (elem of target.querySelectorAll(".table-list,.Box-body,.js-navigation-container")) + elem.setAttribute("role", "table"); + for (elem of target.querySelectorAll(".table-list-item,.Box-body-row,.Box-row")) elem.setAttribute("role", "row"); for (elem of target.querySelectorAll(".d-table")) { // There's one of these inside every .Box-body-row. From b62c5e6a79670d526aa22e07e9a860469bd20c49 Mon Sep 17 00:00:00 2001 From: derekriemer Date: Mon, 2 Jan 2017 19:17:08 -0700 Subject: [PATCH 2/2] Constrain the container to ul's --- GitHubA11yFixes.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GitHubA11yFixes.user.js b/GitHubA11yFixes.user.js index 3fdb383..55355ca 100644 --- a/GitHubA11yFixes.user.js +++ b/GitHubA11yFixes.user.js @@ -104,8 +104,8 @@ function onNodeAdded(target) { onSelectMenuItemChanged(elem); } // Table lists; e.g. in issue and commit listings. - for (elem of target.querySelectorAll(".table-list,.Box-body,.js-navigation-container")) - elem.setAttribute("role", "table"); + for (elem of target.querySelectorAll(".table-list,.Box-body,ul.js-navigation-container")) + elem.setAttribute("role", "table"); for (elem of target.querySelectorAll(".table-list-item,.Box-body-row,.Box-row")) elem.setAttribute("role", "row"); for (elem of target.querySelectorAll(".d-table")) {