diff --git a/src/components/Pagination.astro b/src/components/Pagination.astro index 4e4d5f3..dd22cc9 100644 --- a/src/components/Pagination.astro +++ b/src/components/Pagination.astro @@ -1,104 +1,13 @@ --- +import { Pagination as PaginationReact } from './react/Pagination'; + const { dir, pagination } = Astro.locals.starlightRoute; const { prev, next } = pagination; -const isRtl = dir === 'rtl'; --- - - - + diff --git a/src/components/react/CopyPageButton.tsx b/src/components/react/CopyPageButton.tsx index dcdafcd..7161b88 100644 --- a/src/components/react/CopyPageButton.tsx +++ b/src/components/react/CopyPageButton.tsx @@ -21,7 +21,12 @@ interface CopyPageButtonProps { // ChatGPT logo const ChatGPTIcon = () => ( - + ); @@ -33,7 +38,12 @@ const ClaudeIcon = () => ( // Markdown logo const MarkdownIcon = () => ( - + ); +// Visually hidden text for screen readers +const VisuallyHidden = ({ children }: { children: React.ReactNode }) => ( + {children} +); + export function CopyPageButton({ pageMarkdown, pageUrl, @@ -106,15 +121,30 @@ export function CopyPageButton({ size="sm" className="gap-1 !text-xs h-7" onClick={handleCopy} + aria-label={copied ? 'Copied to clipboard' : 'Copy page to clipboard'} > - {copied ? : } - Copy page + {copied ? ( +