Skip to content

Commit

Permalink
Merged PR 32160: Voeg accessibilityLanguage weer toe bij Engelse abou…
Browse files Browse the repository at this point in the history
…t screen

Add accessibilityLanguage

Related work items: #124272
  • Loading branch information
RikSchefferAmsterdam committed Sep 3, 2024
2 parents 12038b7 + 6c249ee commit 224ca0d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/components/ui/text/list/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ const getItems = (items: Item[]) => {
}

type Props = {
accessibilityLanguage?: string
items: Item[]
} & Partial<ListMarkerProp> &
TestProps

export const List = ({items, marker = 'square', testID}: Props) => {
export const List = ({
items,
marker = 'square',
testID,
accessibilityLanguage,
}: Props) => {
const {textItems, accessibilityLabelItems} = useMemo(
() => getItems(items),
[items],
Expand All @@ -39,6 +45,7 @@ export const List = ({items, marker = 'square', testID}: Props) => {
return (
<SingleSelectable
accessibilityLabel={accessibleText(...accessibilityLabelItems)}
accessibilityLanguage={accessibilityLanguage}
testID={testID}>
<Column gutter="md">
{textItems.map((text, index) => (
Expand Down
13 changes: 11 additions & 2 deletions src/modules/about/screens/AboutTheAppEnglish.screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,24 @@ export const AboutTheAppEnglishScreen = () => {
<Box>
<Column gutter="lg">
<Title
accessibilityLanguage="en-US"
testID="AboutAboutTheAppEnglishTitle"
text="One app for all Amsterdam residents"
/>
<Paragraph
accessibilityLanguage="en-US"
testID="AboutAboutTheAppEnglishIntroParagraph"
variant="intro">
With the Amsterdam app, you can have information at your
fingertips and get in touch with the City.
</Paragraph>
<Paragraph testID="AboutAboutTheAppEnglishSummaryParagraph">
<Paragraph
accessibilityLanguage="en-US"
testID="AboutAboutTheAppEnglishSummaryParagraph">
With the app you can:
</Paragraph>
<List
accessibilityLanguage="en-US"
items={[
'View the rules about waste in your neighbourhood',
'Follow and receive notifications about works in your area',
Expand All @@ -52,17 +57,21 @@ export const AboutTheAppEnglishScreen = () => {
/>
<Column>
<Title
accessibilityLanguage="en-US"
level="h2"
testID="AboutAboutTheAppEnglishLaterMoreTitle"
text="More features are coming soon"
/>
<Paragraph testID="AboutAboutTheAppEnglishFutureFeaturesParagraph">
<Paragraph
accessibilityLanguage="en-US"
testID="AboutAboutTheAppEnglishFutureFeaturesParagraph">
The Amsterdam app is a work in progress. Your opinion is
important to improve the app. Please let us know.
</Paragraph>
</Column>
{!isLoading && !isError && (
<Button
accessibilityLanguage="en-US"
label="Your opinion"
onPress={() => {
if (redirectUrls?.feedbackForm) {
Expand Down

0 comments on commit 224ca0d

Please sign in to comment.