A11Y: announce "link copied!" confirmation for screen readers (#29058)

This commit is contained in:
Kris
2024-10-02 15:54:38 -04:00
committed by GitHub
parent c38b6cc30f
commit 75bb41625b
2 changed files with 5 additions and 0 deletions
@@ -62,6 +62,10 @@ export const ButtonClass = {
attributes["aria-pressed"] = attrs.ariaPressed;
}
if (attrs.ariaLive) {
attributes["aria-live"] = attrs.ariaLive;
}
if (attrs.tabAttrs) {
const tab = attrs.tabAttrs;
attributes["aria-selected"] = tab["aria-selected"];
@@ -354,6 +354,7 @@ registerButton("copyLink", () => {
icon: "d-post-share",
className: "post-action-menu__copy-link",
title: "post.controls.copy_title",
ariaLive: "polite",
};
});