From 9304957fa2240d80b62ba80deac2ec808789c6bd Mon Sep 17 00:00:00 2001 From: Jainam Tushar Sheth Date: Tue, 16 Jul 2024 12:17:38 -0400 Subject: [PATCH 1/8] Added descriptive labels for edit actions on checkout --- .../app/components/toggle-card/index.jsx | 13 ++++- .../pages/checkout/partials/contact-info.jsx | 5 +- .../app/pages/checkout/partials/payment.jsx | 6 ++ .../checkout/partials/shipping-address.jsx | 8 ++- .../checkout/partials/shipping-options.jsx | 6 ++ .../static/translations/compiled/en-GB.json | 24 ++++++++ .../static/translations/compiled/en-US.json | 24 ++++++++ .../static/translations/compiled/en-XA.json | 56 +++++++++++++++++++ .../translations/en-GB.json | 12 ++++ .../translations/en-US.json | 12 ++++ 10 files changed, 163 insertions(+), 3 deletions(-) diff --git a/packages/template-retail-react-app/app/components/toggle-card/index.jsx b/packages/template-retail-react-app/app/components/toggle-card/index.jsx index 7972653f40..dc963d536b 100644 --- a/packages/template-retail-react-app/app/components/toggle-card/index.jsx +++ b/packages/template-retail-react-app/app/components/toggle-card/index.jsx @@ -34,6 +34,12 @@ export const ToggleCard = ({ children, ...props }) => { + let editButtonAriaLabel = 'Edit' + if (typeof editLabel === 'string') { + editButtonAriaLabel = editLabel + } else if (typeof editLabel === 'object' && editLabel?.type?.displayName === 'MemoizedFormattedMessage') { + editButtonAriaLabel = editLabel?.props.defaultMessage[0].value + } return ( {!editing && !disabled && onEdit && ( -