Skip to content

Commit

Permalink
fix: announce travel aid cancellation messages (#4827)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosvik committed Nov 19, 2024
1 parent 135b320 commit bf0325a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/travel-aid/TravelAidScreenComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const TravelAidSection = ({
situationsForFocused.length > 0 ||
noticesForFocused.length > 0) && (
<View style={styles.subContainer}>
{isCancelled && <CancelledDepartureMessage />}
{isCancelled && <CancelledDepartureMessage a11yAnnounce={true} />}

{situationsForFocused.map((situation) => (
<SituationMessageBox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import React from 'react';
import {StyleSheet} from '@atb/theme';
import {CancelledDepartureTexts, useTranslation} from '@atb/translations';

export const CancelledDepartureMessage = () => {
export const CancelledDepartureMessage = ({
a11yAnnounce,
}: {
a11yAnnounce?: boolean;
}) => {
const styles = useStopsStyle();
const {t} = useTranslation();

Expand All @@ -12,6 +16,7 @@ export const CancelledDepartureMessage = () => {
type="error"
style={styles.cancellationContainer}
message={t(CancelledDepartureTexts.message)}
a11yAnnounce={a11yAnnounce}
/>
);
};
Expand Down

0 comments on commit bf0325a

Please sign in to comment.