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 488dc1784b
commit 0aeeb67cac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -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"];

View File

@ -354,6 +354,7 @@ registerButton("copyLink", () => {
icon: "d-post-share",
className: "post-action-menu__copy-link",
title: "post.controls.copy_title",
ariaLive: "polite",
};
});