diff --git a/client/ui/frontend/src/components/CopyToClipboard.tsx b/client/ui/frontend/src/components/CopyToClipboard.tsx index 8fcbd77f3..9a4508310 100644 --- a/client/ui/frontend/src/components/CopyToClipboard.tsx +++ b/client/ui/frontend/src/components/CopyToClipboard.tsx @@ -20,6 +20,7 @@ type CopyToClipboardProps = { alwaysShowIcon?: boolean; variant?: CopyToClipboardVariant; "aria-label"?: string; + tabIndex?: number; }; export const CopyToClipboard = ({ @@ -32,6 +33,7 @@ export const CopyToClipboard = ({ alwaysShowIcon = false, variant = "default", "aria-label": ariaLabel, + tabIndex = 0, }: CopyToClipboardProps) => { const { t } = useTranslation(); const wrapperRef = useRef(null); @@ -67,10 +69,12 @@ export const CopyToClipboard = ({ type="button" ref={wrapperRef} onClick={handleClick} + tabIndex={tabIndex} aria-label={resolvedLabel} aria-live="polite" className={cn( - "inline-flex gap-2 items-center group/copy cursor-default wails-no-draggable text-left pointer-events-auto", + "inline-flex gap-2 items-center group/copy cursor-default wails-no-draggable text-left pointer-events-auto rounded-sm outline-none", + "focus-visible:ring-2 focus-visible:ring-white/60 focus-visible:ring-offset-2 focus-visible:ring-offset-nb-gray-940", className, )} > diff --git a/client/ui/frontend/src/components/buttons/IconButton.tsx b/client/ui/frontend/src/components/buttons/IconButton.tsx index c5262bae3..3300d5ee4 100644 --- a/client/ui/frontend/src/components/buttons/IconButton.tsx +++ b/client/ui/frontend/src/components/buttons/IconButton.tsx @@ -9,16 +9,19 @@ type Props = ButtonHTMLAttributes & { }; export const IconButton = forwardRef(function IconButton( - { icon: Icon, iconSize = 17, iconClassName, className, type = "button", ...props }, + { icon: Icon, iconSize = 17, iconClassName, className, type = "button", disabled, ...props }, ref, ) { return (