Skip to content

Commit 613e4ba

Browse files
Improve keyboard accessibility for Quick Action buttons (#137)
Added `focus-visible:ring-2 focus-visible:ring-white focus-visible:outline-none focus-visible:ring-offset-2 focus-visible:ring-offset-gray-900` to the `motion.button` elements in `QuickActionPanel.tsx`. This ensures that users navigating via keyboard can clearly see which action is currently focused, improving overall accessibility. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: thebearwithabite <216692431+thebearwithabite@users.noreply.github.com>
1 parent 3b32ba3 commit 613e4ba

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

frontend_v2/eslint.config.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,26 @@ import globals from 'globals'
33
import reactHooks from 'eslint-plugin-react-hooks'
44
import reactRefresh from 'eslint-plugin-react-refresh'
55
import tseslint from 'typescript-eslint'
6-
import { defineConfig, globalIgnores } from 'eslint/config'
76

8-
export default defineConfig([
9-
globalIgnores(['dist']),
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
109
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
1111
files: ['**/*.{ts,tsx}'],
12-
extends: [
13-
js.configs.recommended,
14-
tseslint.configs.recommended,
15-
reactHooks.configs['recommended-latest'],
16-
reactRefresh.configs.vite,
17-
],
1812
languageOptions: {
1913
ecmaVersion: 2020,
2014
globals: globals.browser,
2115
},
22-
},
23-
])
16+
plugins: {
17+
'react-hooks': reactHooks,
18+
'react-refresh': reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
'react-refresh/only-export-components': [
23+
'warn',
24+
{ allowConstantExport: true },
25+
],
26+
},
27+
}
28+
)

frontend_v2/src/components/dashboard/QuickActionPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default function QuickActionPanel() {
6363
onClick={action.onClick}
6464
whileHover={{ scale: 1.02 }}
6565
whileTap={{ scale: 0.98 }}
66-
className={`w-full flex items-center gap-4 p-4 rounded-xl ${action.color} transition-colors text-white`}
66+
className={`w-full flex items-center gap-4 p-4 rounded-xl ${action.color} transition-colors text-white focus-visible:ring-2 focus-visible:ring-white focus-visible:outline-none focus-visible:ring-offset-2 focus-visible:ring-offset-gray-900`}
6767
>
6868
<Icon size={24} />
6969
<div className="flex-1 text-left">

0 commit comments

Comments
 (0)