Fixup shortcuts

This commit is contained in:
Half-Shot
2024-11-14 17:26:42 +00:00
parent a7221b3ed7
commit f3b1477ef0
2 changed files with 9 additions and 11 deletions

View File

@@ -9,12 +9,12 @@
"edit": "Edit",
"go": "Go",
"invite": "Invite",
"lower_hand": "Lower hand",
"lower_hand": "Lower hand ({{keyboardShortcut}})",
"no": "No",
"open_search": "Open search",
"pick_reaction": "Pick reaction",
"raise_hand": "Raise hand",
"raise_hand_or_send_reaction": "Raise hand or send reaction ({{keyboardShortcut}})",
"raise_hand": "Raise hand ({{keyboardShortcut}})",
"raise_hand_or_send_reaction": "Raise hand or send reaction",
"register": "Register",
"remove": "Remove",
"sign_in": "Sign in",

View File

@@ -47,17 +47,12 @@ const InnerButton: FC<InnerButtonProps> = ({ raised, open, ...props }) => {
const { t } = useTranslation();
return (
<Tooltip
label={t("action.raise_hand_or_send_reaction", { keyboardShortcut: "H" })}
>
<Tooltip label={t("action.raise_hand_or_send_reaction")}>
<CpdButton
className={classNames(raised && styles.raisedButton)}
aria-expanded={open}
aria-haspopup
aria-keyshortcuts="H"
aria-label={t("action.raise_hand_or_send_reaction", {
keyboardShortcut: "H",
})}
aria-label={t("action.raise_hand_or_send_reaction")}
kind={raised || open ? "primary" : "secondary"}
iconOnly
Icon={raised ? RaisedHandSolidIcon : ReactionIcon}
@@ -119,7 +114,9 @@ export function ReactionPopupMenu({
},
[sendReaction, filteredReactionSet, canReact, setIsSearching],
);
const label = isHandRaised ? t("action.lower_hand") : t("action.raise_hand");
const label = isHandRaised
? t("action.lower_hand", { keyboardShortcut: "H" })
: t("action.raise_hand", { keyboardShortcut: "H" });
return (
<>
{errorText && (
@@ -136,6 +133,7 @@ export function ReactionPopupMenu({
<Tooltip label={label}>
<CpdButton
kind={isHandRaised ? "primary" : "secondary"}
aria-keyshortcuts="H"
aria-pressed={isHandRaised}
aria-label={label}
onClick={() => toggleRaisedHand()}