Skip to content

Commit

Permalink
feature/7811-HomeScreenButtonsA11y (#9021)
Browse files Browse the repository at this point in the history
  • Loading branch information
theodur authored Jul 18, 2024
1 parent 8be2664 commit 1c78ce5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions VAMobile/src/components/Templates/CategoryLanding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const CategoryLanding: FC<CategoryLandingProps> = ({
? {
text: headerButton.label,
a11yLabel: headerButton.labelA11y,
accessibilityRole: headerButton.accessibilityRole,
onPress: headerButton.onPress,
icon: headerButton.icon,
}
Expand Down
3 changes: 3 additions & 0 deletions VAMobile/src/components/types/HeaderButton.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { AccessibilityRole } from 'react-native'

import { VAIconProps } from 'components/VAIcon'

export type HeaderButton = {
label: string
labelA11y?: string
accessibilityRole?: AccessibilityRole
icon: VAIconProps
onPress: () => void
testID?: string
Expand Down
4 changes: 3 additions & 1 deletion VAMobile/src/screens/HomeScreen/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
CategoryLanding,
CategoryLandingAlert,
EncourageUpdateAlert,
HeaderButton,
LinkRow,
LoadingComponent,
Nametag,
Expand Down Expand Up @@ -253,8 +254,9 @@ export function HomeScreen({}: HomeScreenProps) {
navigateTo('Profile')
}

const headerButton = {
const headerButton: HeaderButton = {
label: t('profile.title'),
accessibilityRole: 'link',
icon: profileIconProps,
onPress: onProfile,
}
Expand Down

0 comments on commit 1c78ce5

Please sign in to comment.