Skip to content

Commit

Permalink
a11y: add aria-current to the selected item
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Sep 25, 2019
1 parent d4e362d commit d089773
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions public/js/selfoss-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,13 @@ selfoss.ui = {
entrySelect: function(entry) {
if (selfoss.ui.selectedEntry !== null) {
selfoss.ui.selectedEntry.removeClass('selected');
selfoss.ui.selectedEntry.attr('aria-current', 'false');
}

selfoss.ui.selectedEntry = entry;

if (entry) {
selfoss.ui.selectedEntry.attr('aria-current', 'true');
entry.addClass('selected');
}
},
Expand Down

0 comments on commit d089773

Please sign in to comment.