axe-core flagged 18 'button-name' criticals on the room view: the space tabs, Home/Direct/Inbox/Search/Saved/Explore/Add Space/User Settings/ Unverified sidebar buttons, and each message's avatar button had no text for screen readers. Labels mirror the existing tooltips; message avatars read '<name>, open profile'. Room view now has zero button-name findings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
30 lines
845 B
TypeScript
30 lines
845 B
TypeScript
import React from 'react';
|
|
import { Icon, Icons } from 'folds';
|
|
import { useAtom } from 'jotai';
|
|
import { SidebarAvatar, SidebarItem, SidebarItemTooltip } from '../../../components/sidebar';
|
|
import { bookmarksPanelAtom } from '../../../state/bookmarksPanel';
|
|
|
|
export function BookmarksTab() {
|
|
const [opened, setOpen] = useAtom(bookmarksPanelAtom);
|
|
|
|
const toggle = () => setOpen((v) => !v);
|
|
|
|
return (
|
|
<SidebarItem active={opened}>
|
|
<SidebarItemTooltip tooltip="Saved Messages">
|
|
{(triggerRef) => (
|
|
<SidebarAvatar
|
|
as="button"
|
|
ref={triggerRef}
|
|
aria-label="Saved Messages"
|
|
outlined
|
|
onClick={toggle}
|
|
>
|
|
<Icon src={Icons.Star} filled={opened} />
|
|
</SidebarAvatar>
|
|
)}
|
|
</SidebarItemTooltip>
|
|
</SidebarItem>
|
|
);
|
|
}
|