Skip to content

Commit 69b0a6a

Browse files
fix(UI): better focus (#934)
**Before** <img width="68" alt="Capture d’écran 2025-02-04 à 18 54 16" src="https://github.com/user-attachments/assets/01e6a58a-d554-4a4c-a89c-3ec751f88469" /> **After** <img width="315" alt="Capture d’écran 2025-02-04 à 19 01 24" src="https://github.com/user-attachments/assets/826a1ed4-9041-4202-9a84-7e6c8e9a8903" /> <img width="411" alt="Capture d’écran 2025-02-04 à 18 54 28" src="https://github.com/user-attachments/assets/0fe1acc8-3945-4883-a04d-67f98e66dfa4" /> Fixe #926
1 parent 95d73e2 commit 69b0a6a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frontend/components/Nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export interface NavItemProps {
4949
export function NavItem(props: NavItemProps) {
5050
return (
5151
<a
52-
class={`md:px-3 px-4 py-2 text-sm md:text-base min-h-10 leading-none rounded-md hover:bg-jsr-cyan-100 flex items-center select-none ${
52+
class={`md:px-3 px-4 py-2 text-sm md:text-base min-h-10 leading-none rounded-md hover:bg-jsr-cyan-100 flex items-center select-none focus:outline-none focus:border-1 focus:border-jsr-cyan-300 focus:ring-1 focus:ring-jsr-cyan-300 focus:ring-opacity-50 ${
5353
props.active
5454
? "bg-jsr-cyan-50 border-1 border-jsr-cyan-300/30 font-semibold"
5555
: ""

frontend/islands/UserMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function UserMenu({ user, sudo, logoutUrl }: {
3636
<div class="relative select-none" ref={ref}>
3737
<button
3838
id={`${prefix}-user-menu`}
39-
class="flex items-center rounded-full"
39+
class="flex items-center rounded-full focus-visible:ring-2 ring-inset outline-none *:focus-visible:ring-jsr-cyan-400 *:focus-visible:ring-offset-1"
4040
onClick={() => setOpen((v) => !v)}
4141
aria-expanded={open ? "true" : "false"}
4242
>

0 commit comments

Comments
 (0)