Skip to content

Commit c321092

Browse files
Add focus styles to the Remix Jam FAQ to improve accessibility (#344)
* Add focus styles to the Remix Jam FAQ to improve accessibility When using the keyboard to navigate the FAQ toggles, no focus styles are shown except when the FAQ is expanded. * add group to summary and switch to focus-visible --------- Co-authored-by: Brooks Lybrand <[email protected]>
1 parent 6f2ca6e commit c321092

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/routes/jam/faq.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ export function Question({
176176
>
177177
<summary
178178
onClick={handleSummaryClick}
179-
className="_no-triangle flex cursor-pointer items-center justify-between gap-3 p-4 font-conf-mono font-normal text-white transition-colors hover:bg-black md:p-6"
179+
className="_no-triangle group flex cursor-pointer items-center justify-between gap-3 p-4 font-conf-mono font-normal text-white outline-none transition-colors hover:bg-black focus-visible:bg-black md:p-6"
180180
>
181181
{question}
182182
{/* Plus/Minus Icon - relies solely on group-open state */}
183-
<div className="relative size-4 shrink-0 rounded-full p-1 opacity-30 ring ring-white/80 group-open:opacity-100 group-hover:opacity-100 md:size-8">
183+
<div className="relative size-4 shrink-0 rounded-full p-1 opacity-30 ring ring-white/80 group-open:opacity-100 group-hover:opacity-100 group-focus-visible:opacity-100 md:size-8">
184184
<span className="absolute left-1/2 top-1/2 block h-[2px] w-1/2 -translate-x-1/2 -translate-y-1/2 bg-white/80" />
185185
<span
186186
className={clsx(

0 commit comments

Comments
 (0)