Skip to content

Commit 3057a37

Browse files
committed
Trello: Make list headers accessible as headings.
1 parent 72e40b5 commit 3057a37

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

TrelloA11yFixes.user.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ function onNodeAdded(target) {
4141
var id = "axsg-lh" + idCounter++;
4242
header.setAttribute("id", id);
4343
list.setAttribute("aria-labelledby", id);
44+
// Make the header's container into a heading.
45+
header.parentNode.setAttribute("role", "heading");
46+
header.parentNode.setAttribute("aria-level", "2");
4447
}
4548
}
4649
for (var card of target.querySelectorAll(".list-card")) {

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,4 @@ It does the following:
9595
If you are using a screen reader, you will need to ensure that the arrow keys are passed to the application to make use of this.
9696
For NVDA, you can achieve this by switching to focus mode to move through cards.
9797
- Labels badges in cards.
98+
- Makes list headers accessible as headings.

0 commit comments

Comments
 (0)