Skip to content

Commit 3785d5a

Browse files
refactor(web): rabbit-feedback
1 parent 3aff981 commit 3785d5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

web/src/components/CaseStarButton.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,15 @@ const CaseStarButton: React.FC<{ id: string }> = ({ id }) => {
3737
const { starredCases, starCase } = useStarredCases();
3838
const isDesktop = useIsDesktop();
3939
const starred = useMemo(() => Boolean(starredCases.get(id)), [id, starredCases]);
40+
const text = starred ? "Remove from favorite" : "Add to favorite";
4041
return (
41-
<Tooltip text={starred ? "Add to favorite" : "Remove from favorite"} place={isDesktop ? "top" : "bottom"}>
42+
<Tooltip {...{ text }} place={isDesktop ? "top" : "bottom"}>
4243
<StyledButton
4344
Icon={Star}
4445
text=""
4546
starred={starred}
47+
aria-label={text}
48+
aria-checked={starred}
4649
onClick={(e) => {
4750
e.stopPropagation();
4851
starCase(id);

0 commit comments

Comments
 (0)