Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions GitHubA11yFixes.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ const DYNAMIC_TWEAKS = [
// Remove headings from folder and file lists.
{selector: 'table[aria-labelledby=folders-and-files] :is(h2, h3)',
tweak: makePresentational},
// Remove table-related roles from release asset links.
{selector: 'ul:not([role]):has(li[role="row"])',
tweak: el => {
// Add a list role, for future proofing in case GitHub double down on making these tables.
el.setAttribute("role", "list");
el.querySelectorAll('li[role="row"]').forEach(row => {
row.removeAttribute("role");
row.querySelectorAll('[role="cell"]').forEach(cell => cell.removeAttribute("role"));
});
}},
];

/*** Lights, camera, action! ***/
Expand Down