Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
a11y(desktop): use semantic buttons in mode controls
Richie McIlroy9329b08c6f47
diff --git a/apps/desktop/src/components/Mode.tsx b/apps/desktop/src/components/Mode.tsxindex 01f7f9439..c12e80547 100644--- a/apps/desktop/src/components/Mode.tsx+++ b/apps/desktop/src/components/Mode.tsx@@ -76,7 +76,7 @@ const Mode = (props: ModeProps) => {class="absolute -left-1.5 -top-2 p-1 rounded-full w-fit bg-gray-5 group focus:outline-none"aria-label="Recording mode info">- <IconCapInfo class="invert transition-opacity duration-200 cursor-pointer size-2.5 dark:invert-0 group-hover:opacity-50" />+ <IconCapInfo class="invert transition-opacity duration-200 size-2.5 dark:invert-0 group-hover:opacity-50" /></button>{MODE_BUTTONS.map((button) => {@@ -90,13 +90,14 @@ const Mode = (props: ModeProps) => {gutter={12}><HoverCard.Trigger- as="div"+ as="button"+ type="button"onClick={() => {setOptions({ mode: button.mode });commands.setRecordingMode(button.mode);}}class={cx(- "relative flex justify-center items-center rounded-full transition-all duration-200 cursor-pointer size-7",+ "relative flex justify-center items-center rounded-full transition-all duration-200 size-7 focus:outline-none",isSelected()? "ring-2 ring-offset-1 ring-offset-gray-1 bg-gray-7 hover:bg-gray-7 ring-blue-500": "bg-gray-3 hover:bg-gray-7",diff --git a/apps/desktop/src/routes/(window-chrome)/new-main/ModeInfoPanel.tsx b/apps/desktop/src/routes/(window-chrome)/new-main/ModeInfoPanel.tsxindex 34c4f7ee3..cef3c4f93 100644--- a/apps/desktop/src/routes/(window-chrome)/new-main/ModeInfoPanel.tsx+++ b/apps/desktop/src/routes/(window-chrome)/new-main/ModeInfoPanel.tsx@@ -45,15 +45,16 @@ export default function ModeInfoPanel(props: ModeInfoPanelProps) {return (<div class="flex flex-col w-full h-full min-h-0"><div class="flex gap-3 justify-between items-center mt-3">- <div+ <button+ type="button"onClick={() => props.onBack()}- class="flex gap-1 items-center rounded-md px-1.5 text-xs cursor-pointer+ class="flex gap-1 items-center rounded-md px-1.5 text-xstext-gray-11 transition-opacity hover:opacity-70 hover:text-gray-12focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-9 focus-visible:ring-offset-2 focus-visible:ring-offset-gray-1"><IconLucideArrowLeft class="size-3 text-gray-11" /><span class="font-medium text-gray-12">Back</span>- </div>+ </button><span class="text-xs font-medium text-gray-11">Recording Modes</span></div><div class="flex flex-col flex-1 min-h-0 pt-4">@@ -74,10 +75,11 @@ export default function ModeInfoPanel(props: ModeInfoPanelProps) {exitToClass="scale-95"><div style={{ "transition-delay": `${index() * 100}ms` }}>- <div+ <button+ type="button"onClick={() => handleModeSelect(option.mode)}class={cx(- "relative flex items-center gap-3 p-3 rounded-xl border-2 transition-all duration-200 cursor-pointer",+ "relative flex items-center gap-3 p-3 w-full text-left rounded-xl border-2 transition-all duration-200",isSelected()? "border-blue-9 bg-blue-3 dark:bg-blue-3/30": "border-gray-4 dark:border-gray-5 bg-gray-2 dark:bg-gray-3 hover:border-gray-6 dark:hover:border-gray-6 hover:bg-gray-3 dark:hover:bg-gray-4",@@ -111,7 +113,7 @@ export default function ModeInfoPanel(props: ModeInfoPanelProps) {{option.description}</p></div>- </div>+ </button></div></Transition>);