fix: use ring instead of outline on components
This commit is contained in:
parent
76d263b7e6
commit
44d08169a9
@ -41,6 +41,7 @@ function TabLink({ name, to, icon }: TabLinkProps) {
|
|||||||
'after:absolute after:bottom-0 after:left-3 after:right-3',
|
'after:absolute after:bottom-0 after:left-3 after:right-3',
|
||||||
'after:h-0.5 after:bg-headplane-900 dark:after:bg-headplane-200',
|
'after:h-0.5 after:bg-headplane-900 dark:after:bg-headplane-200',
|
||||||
'hover:bg-headplane-200 dark:hover:bg-headplane-900',
|
'hover:bg-headplane-200 dark:hover:bg-headplane-900',
|
||||||
|
'focus:outline-none focus:ring',
|
||||||
isActive ? 'after:visible' : 'after:invisible',
|
isActive ? 'after:visible' : 'after:invisible',
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -57,7 +58,10 @@ function Link({ href, text }: LinkProps) {
|
|||||||
href={href}
|
href={href}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
className="hidden sm:block hover:underline text-sm"
|
className={cn(
|
||||||
|
'hidden sm:block hover:underline text-sm',
|
||||||
|
'focus:outline-none focus:ring rounded-md',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{text}
|
{text}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -24,6 +24,7 @@ export default function Link({
|
|||||||
'inline-flex items-center gap-x-0.5',
|
'inline-flex items-center gap-x-0.5',
|
||||||
'text-blue-500 hover:text-blue-700',
|
'text-blue-500 hover:text-blue-700',
|
||||||
'dark:text-blue-400 dark:hover:text-blue-300',
|
'dark:text-blue-400 dark:hover:text-blue-300',
|
||||||
|
'focus:outline-none focus:ring rounded-md',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -12,7 +12,6 @@ export interface TooltipProps extends AriaTooltipProps {
|
|||||||
children: [React.ReactElement, React.ReactElement<TooltipBodyProps>];
|
children: [React.ReactElement, React.ReactElement<TooltipBodyProps>];
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Fix Button accessibility outline + invoke
|
|
||||||
function Tooltip(props: TooltipProps) {
|
function Tooltip(props: TooltipProps) {
|
||||||
const state = useTooltipTriggerState({
|
const state = useTooltipTriggerState({
|
||||||
...props,
|
...props,
|
||||||
@ -37,7 +36,10 @@ function Tooltip(props: TooltipProps) {
|
|||||||
<button
|
<button
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...triggerProps}
|
{...triggerProps}
|
||||||
className="flex items-center justify-center"
|
className={cn(
|
||||||
|
'flex items-center justify-center',
|
||||||
|
'focus:outline-none focus:ring rounded-xl',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{component}
|
{component}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -90,10 +90,13 @@ export default function MachineRow({
|
|||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={machine.id}
|
key={machine.id}
|
||||||
className="group hover:bg-headplane-50 dark:hover:bg-headplane-950"
|
className="'group hover:bg-headplane-50 dark:hover:bg-headplane-950"
|
||||||
>
|
>
|
||||||
<td className="pl-0.5 py-2">
|
<td className="pl-0.5 py-2 focus-within:ring">
|
||||||
<Link to={`/machines/${machine.id}`} className="group/link h-full">
|
<Link
|
||||||
|
to={`/machines/${machine.id}`}
|
||||||
|
className={cn('group/link h-full focus:outline-none')}
|
||||||
|
>
|
||||||
<p
|
<p
|
||||||
className={cn(
|
className={cn(
|
||||||
'font-semibold leading-snug',
|
'font-semibold leading-snug',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user