diff --git a/web/src/features/home/ChannelList.module.css b/web/src/features/home/ChannelList.module.css index 95b7202..cfd9a3a 100644 --- a/web/src/features/home/ChannelList.module.css +++ b/web/src/features/home/ChannelList.module.css @@ -3,6 +3,14 @@ font-size: 13px; } +.quiet { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip-path: inset(50%); +} + .list { margin: 0; padding: 0; diff --git a/web/src/features/home/ChannelList.tsx b/web/src/features/home/ChannelList.tsx index 6f0b1f9..94cbbb8 100644 --- a/web/src/features/home/ChannelList.tsx +++ b/web/src/features/home/ChannelList.tsx @@ -11,9 +11,11 @@ interface Props { kind: 'channel' | 'share'; title: string; onOpen: (c: ChannelInfo | Share) => void; + /** 标题只给屏幕阅读器(所在分区已有标题) */ + quietTitle?: boolean; } -export function ChannelList({ kind, title, onOpen }: Props) { +export function ChannelList({ kind, title, onOpen, quietTitle = false }: Props) { const channels = useChannels((s) => s.list); const forgetChannel = useChannels((s) => s.forget); const shares = useShares((s) => s.list); @@ -24,7 +26,7 @@ export function ChannelList({ kind, title, onOpen }: Props) { return (
-

{title}

+

{title}