From 4d44e32d8aacf6244419818734123fd8f217420d Mon Sep 17 00:00:00 2001 From: Scott Benton Date: Sun, 29 Oct 2023 23:43:06 -0400 Subject: [PATCH 1/3] fix(focus): Began improving focus indicators - need to come back later --- src/providers/ThemeProvider/themes/ironsworn-light.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/providers/ThemeProvider/themes/ironsworn-light.ts b/src/providers/ThemeProvider/themes/ironsworn-light.ts index 8d806218..bd03e2c3 100644 --- a/src/providers/ThemeProvider/themes/ironsworn-light.ts +++ b/src/providers/ThemeProvider/themes/ironsworn-light.ts @@ -39,5 +39,14 @@ export const ironswornLightTheme = createTheme({ }, }, }, + MuiButtonBase: { + styleOverrides: { + root: { + "&.Mui-focusVisible": { + outline: `2px solid ${ironswornPink.dark}`, + }, + }, + }, + }, }, }); From 23ac6afecdf4343421f8ed7efa79e5d2fe0fd3d4 Mon Sep 17 00:00:00 2001 From: Scott Benton Date: Tue, 31 Oct 2023 18:06:43 -0400 Subject: [PATCH 2/3] fix(focus styling): Improved focus styling on buttons --- .../features/characters/StatComponent.tsx | 8 ------- src/components/shared/Layout/Header.tsx | 6 ++++++ src/components/shared/Layout/HeaderMenu.tsx | 1 + src/pages/Home/HomePage.tsx | 3 +++ .../ThemeProvider/themes/ironsworn-dark.ts | 20 ++++++++++++++++++ .../ThemeProvider/themes/ironsworn-light.ts | 17 ++++++++++++--- .../ThemeProvider/themes/starforged-dark.tsx | 20 ++++++++++++++++++ .../ThemeProvider/themes/starforged-light.tsx | 21 +++++++++++++++++++ 8 files changed, 85 insertions(+), 11 deletions(-) diff --git a/src/components/features/characters/StatComponent.tsx b/src/components/features/characters/StatComponent.tsx index ce9218c8..c968829a 100644 --- a/src/components/features/characters/StatComponent.tsx +++ b/src/components/features/characters/StatComponent.tsx @@ -90,14 +90,6 @@ export function StatComponent(props: StatComponentProps) { outlineColor: theme.palette.primary.main, borderColor: theme.palette.primary.main, }, - "&:focus-visible": - updateTrack || disableRoll - ? {} - : { - outlineWidth: 2, - outlineColor: theme.palette.primary.main, - borderColor: theme.palette.primary.main, - }, }), ...(Array.isArray(sx) ? sx : [sx]), diff --git a/src/components/shared/Layout/Header.tsx b/src/components/shared/Layout/Header.tsx index 05674c40..eb59186b 100644 --- a/src/components/shared/Layout/Header.tsx +++ b/src/components/shared/Layout/Header.tsx @@ -67,6 +67,7 @@ export function Header() { focusRipple LinkComponent={LinkComponent} href={"/"} + className={"dark-focus-outline"} sx={(theme) => ({ display: "flex", alignItems: "center", @@ -98,6 +99,7 @@ export function Header() { sx={{ display: "inline" }} > @@ -154,6 +159,7 @@ export function Header() { color={"primary"} component={Link} to={basePaths[BASE_ROUTES.SIGNUP]} + className={"dark-focus-outline"} > Create Account diff --git a/src/components/shared/Layout/HeaderMenu.tsx b/src/components/shared/Layout/HeaderMenu.tsx index 15b17df0..c5c18f05 100644 --- a/src/components/shared/Layout/HeaderMenu.tsx +++ b/src/components/shared/Layout/HeaderMenu.tsx @@ -43,6 +43,7 @@ export function HeaderMenu() { <> {isLoggedIn ? (