Skip to content

Commit

Permalink
fix(focus indicators): Added more accessible focus indicators to all …
Browse files Browse the repository at this point in the history
…buttons
  • Loading branch information
scottbenton committed Nov 1, 2023
1 parent b7a6979 commit fb2f193
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@

### Accessibility

- Improved tab focus indicators

### Bug Fixes

- Fixed Planet Class not being properly set when creating new planets
- Fixed custom move and custom oracle ids not being created properly
- Fixed action rolls being able to go over a 10 on the d6.

## 2.0.0

Expand Down
4 changes: 2 additions & 2 deletions src/providers/ThemeProvider/themes/ironsworn-dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const ironswornDarkTheme = createTheme({
root: ({ ownerState, theme }) => {
return {
"&.Mui-focusVisible": {
boxShadow: `inset 0 0 0 2px ${theme.palette.info.main}, 0 0 0 2px ${theme.palette.info.main}`,
boxShadow: `inset 0 0 0 2px ${theme.palette.info.light}, 0 0 0 2px ${theme.palette.info.light}`,
},
};
},
Expand All @@ -70,7 +70,7 @@ export const ironswornDarkTheme = createTheme({
styleOverrides: {
root: ({ ownerState, theme }) => ({
"&.Mui-focusVisible": {
boxShadow: `inset 0 0 0 2px ${theme.palette.info.main}, 0 0 0 2px ${theme.palette.info.main}`,
boxShadow: `inset 0 0 0 2px ${theme.palette.info.light}, 0 0 0 2px ${theme.palette.info.light}`,
},
}),
},
Expand Down
6 changes: 6 additions & 0 deletions src/providers/ThemeProvider/themes/ironsworn-light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export const ironswornLightTheme = createTheme({
return {
"&.Mui-focusVisible": {
boxShadow: `inset 0 0 0 2px ${theme.palette.info.main}, 0 0 0 2px ${theme.palette.info.main}`,
"&.dark-focus-outline": {
boxShadow: `inset 0 0 0 2px ${theme.palette.info.light}, 0 0 0 2px ${theme.palette.info.light}`,
},
},
};
},
Expand All @@ -55,6 +58,9 @@ export const ironswornLightTheme = createTheme({
root: ({ ownerState, theme }) => ({
"&.Mui-focusVisible": {
boxShadow: `inset 0 0 0 2px ${theme.palette.info.main}, 0 0 0 2px ${theme.palette.info.main}`,
"&.dark-focus-outline": {
boxShadow: `inset 0 0 0 2px ${theme.palette.info.light}, 0 0 0 2px ${theme.palette.info.light}`,
},
},
}),
},
Expand Down
4 changes: 2 additions & 2 deletions src/providers/ThemeProvider/themes/starforged-dark.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const starforgedDarkTheme = createTheme({
root: ({ ownerState, theme }) => {
return {
"&.Mui-focusVisible": {
boxShadow: `inset 0 0 0 2px ${sharedStatusColors.error.main}, 0 0 0 2px ${sharedStatusColors.error.main}`,
boxShadow: `inset 0 0 0 2px ${theme.palette.info.light}, 0 0 0 2px ${theme.palette.info.light}`,
},
};
},
Expand All @@ -85,7 +85,7 @@ export const starforgedDarkTheme = createTheme({
styleOverrides: {
root: ({ ownerState, theme }) => ({
"&.Mui-focusVisible": {
boxShadow: `inset 0 0 0 2px ${sharedStatusColors.error.main}, 0 0 0 2px ${sharedStatusColors.error.main}`,
boxShadow: `inset 0 0 0 2px ${theme.palette.info.light}, 0 0 0 2px ${theme.palette.info.light}`,
},
}),
},
Expand Down
10 changes: 8 additions & 2 deletions src/providers/ThemeProvider/themes/starforged-light.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ export const starforgedLightTheme = createTheme({
root: ({ ownerState, theme }) => {
return {
"&.Mui-focusVisible": {
boxShadow: `inset 0 0 0 2px ${sharedStatusColors.error.main}, 0 0 0 2px ${sharedStatusColors.error.main}`,
boxShadow: `inset 0 0 0 2px ${theme.palette.info.main}, 0 0 0 2px ${theme.palette.info.main}`,
"&.dark-focus-outline": {
boxShadow: `inset 0 0 0 2px ${theme.palette.info.light}, 0 0 0 2px ${theme.palette.info.light}`,
},
},
};
},
Expand All @@ -70,7 +73,10 @@ export const starforgedLightTheme = createTheme({
styleOverrides: {
root: ({ ownerState, theme }) => ({
"&.Mui-focusVisible": {
boxShadow: `inset 0 0 0 2px ${sharedStatusColors.error.main}, 0 0 0 2px ${sharedStatusColors.error.main}`,
boxShadow: `inset 0 0 0 2px ${theme.palette.info.main}, 0 0 0 2px ${theme.palette.info.main}`,
"&.dark-focus-outline": {
boxShadow: `inset 0 0 0 2px ${theme.palette.info.light}, 0 0 0 2px ${theme.palette.info.light}`,
},
},
}),
},
Expand Down

0 comments on commit fb2f193

Please sign in to comment.