A11Y: Focus last viewed topic in topic lists (#15300)
This commit is contained in:
parent
091ca9dbb1
commit
76aeee6735
|
@ -245,12 +245,16 @@ export default Component.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
const $topic = $(this.element);
|
||||
$topic
|
||||
.addClass("highlighted")
|
||||
.attr("data-islastviewedtopic", opts.isLastViewedTopic);
|
||||
this.element.classList.add("highlighted");
|
||||
this.element.setAttribute(
|
||||
"data-islastviewedtopic",
|
||||
opts.isLastViewedTopic
|
||||
);
|
||||
this.element.querySelector(".main-link .title").focus();
|
||||
|
||||
$topic.on("animationend", () => $topic.removeClass("highlighted"));
|
||||
this.element.addEventListener("animationend", () => {
|
||||
this.element.classList.remove("highlighted");
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue