diff --git a/src/common/components/layout/CustomHeader.tsx b/src/common/components/layout/CustomHeader.tsx index 1d43ee1..45a67a4 100644 --- a/src/common/components/layout/CustomHeader.tsx +++ b/src/common/components/layout/CustomHeader.tsx @@ -7,11 +7,7 @@ import { useMyState } from '@/common'; const { Header } = Layout; -interface CustomHeaderProps { - // Props interface reserved for future use -} - -export const CustomHeader: React.FC = () => { +export const CustomHeader: React.FC = () => { const { snap } = useMyState(); // 在登录页面不显示header diff --git a/src/common/components/layout/QuickActionIcons.tsx b/src/common/components/layout/QuickActionIcons.tsx index 1f15f6c..122b944 100644 --- a/src/common/components/layout/QuickActionIcons.tsx +++ b/src/common/components/layout/QuickActionIcons.tsx @@ -34,6 +34,15 @@ const QuickActionIcons: React.FC = () => {
navigate(action.path)} + role="button" + tabIndex={0} + onKeyDown={(e) => { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + navigate(action.path); + } + }} + aria-label={action.title} style={{ fontSize: 20, color: '#262626', diff --git a/src/pages/components/QuickActionCard.tsx b/src/pages/components/QuickActionCard.tsx index 593c57b..1d53302 100644 --- a/src/pages/components/QuickActionCard.tsx +++ b/src/pages/components/QuickActionCard.tsx @@ -28,6 +28,15 @@ const QuickActionCard: React.FC = ({ { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + handleClick(); + } + }} + aria-label={`${title} - ${description}`} style={{ width: '100%', height: 160,