We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3aff981 commit 3785d5aCopy full SHA for 3785d5a
web/src/components/CaseStarButton.tsx
@@ -37,12 +37,15 @@ const CaseStarButton: React.FC<{ id: string }> = ({ id }) => {
37
const { starredCases, starCase } = useStarredCases();
38
const isDesktop = useIsDesktop();
39
const starred = useMemo(() => Boolean(starredCases.get(id)), [id, starredCases]);
40
+ const text = starred ? "Remove from favorite" : "Add to favorite";
41
return (
- <Tooltip text={starred ? "Add to favorite" : "Remove from favorite"} place={isDesktop ? "top" : "bottom"}>
42
+ <Tooltip {...{ text }} place={isDesktop ? "top" : "bottom"}>
43
<StyledButton
44
Icon={Star}
45
text=""
46
starred={starred}
47
+ aria-label={text}
48
+ aria-checked={starred}
49
onClick={(e) => {
50
e.stopPropagation();
51
starCase(id);
0 commit comments