Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [IOCOM-2160] Service button accessibility role in message details #6758

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { PropsWithChildren } from "react";
import { StyleSheet, View } from "react-native";
import { Divider, H3, BodySmall, VSpacer } from "@pagopa/io-app-design-system";
import { pipe } from "fp-ts/lib/function";
import * as O from "fp-ts/lib/Option";
import * as pot from "@pagopa/ts-commons/lib/pot";
import { ServiceId } from "../../../../../definitions/backend/ServiceId";
import { localeDateFormat } from "../../../../utils/locale";
import I18n from "../../../../i18n";
import { logosForService } from "../../../services/common/utils";
import { useIOSelector } from "../../../../store/hooks";
import { serviceByIdPotSelector } from "../../../services/details/store/reducers";
import { serviceByIdSelector } from "../../../services/details/store/reducers";
import { gapBetweenItemsInAGrid } from "../../utils";
import { UIMessageId } from "../../types";
import { OrganizationHeader } from "./OrganizationHeader";
Expand Down Expand Up @@ -53,11 +50,7 @@ export const MessageDetailsHeader = ({
serviceId,
...rest
}: MessageDetailsHeaderProps) => {
const service = pipe(
useIOSelector(state => serviceByIdPotSelector(state, serviceId)),
pot.toOption,
O.toUndefined
);
const service = useIOSelector(state => serviceByIdSelector(state, serviceId));

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const OrganizationHeader = ({
{organizationName}
</Body>
<BodySmall
accessibilityRole="button"
color={theme["interactiveElem-default"]}
onPress={navigateToServiceDetails}
weight="Semibold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ exports[`MessageDetailsHeader component should match the snapshot with default p
Ċentru tas-Saħħa
</Text>
<Text
accessibilityRole="button"
allowFontScaling={true}
dynamicTypeRamp="footnote"
maxFontSizeMultiplier={1.5}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ exports[`OrganizationHeader component should match the snapshot 1`] = `
#### organization_name ####
</Text>
<Text
accessibilityRole="button"
allowFontScaling={true}
dynamicTypeRamp="footnote"
maxFontSizeMultiplier={1.5}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ exports[`MessageDetailsScreen should match the snapshot when everything went fin
Ċentru tas-Saħħa
</Text>
<Text
accessibilityRole="button"
allowFontScaling={true}
dynamicTypeRamp="footnote"
maxFontSizeMultiplier={1.5}
Expand Down
Loading