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

W-14337993: Fix a11y for tab focus, implement gift option for basket #1546

Merged
merged 14 commits into from
Nov 21, 2023

Conversation

alexvuong
Copy link
Collaborator

@alexvuong alexvuong commented Nov 17, 2023

Description

This PR fixes a11y issues in https://gus.lightning.force.com/a07EE00001cqESEYA2

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • (change1)

How to Test-Drive This PR

  • Check out code
  • Add item to cart
  • Go to Cart page
  • Check the "thiis is a gift" checkbox using keyboard
  • Tab to the 'info' icon next to promotion applied in Order Summary. Make sure the screen reader can regconize content in the pop-up

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@alexvuong alexvuong requested a review from a team as a code owner November 17, 2023 00:12
@@ -56,25 +56,25 @@ const PromoPopover = ({header, children, ...props}) => {
})}
/>
</PopoverTrigger>
<Portal>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Portal makes the PopoverContent not focusable

<Box boxShadow="lg">
<PopoverArrow />
<PopoverCloseButton />
<PopoverHeader borderBottom="none" tabindex="0">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding tabIndex here to make the screen reader recognize and read the content. Without it, it will ignore, and only close button is focusable with keyboard

/>
</Button>
</Box>
{/* Uncomment if you want to provide a link to your gift site*/}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we don't have link for this button, let comment it out from here to avoid a11y issue. Developer can use it when they see fit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment out this code but delete the translation? Do we want to take a consistent action here, either delete both, or comment out both? If you choose to comment out both, you'll have to update your comment above to indicate that they can also go uncomment out the translation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translations are usually automatically generated, it does not make sense to comment it there, but we can add a note here to tell dev to re-build translation if they choose to uncomment out this section.

wjhsf
wjhsf previously approved these changes Nov 21, 2023
…le-by-keyboard' into W-14337993/a11y-fix-funcs-operable-by-keyboard
@alexvuong alexvuong merged commit 6b30966 into develop Nov 21, 2023
20 checks passed
@wjhsf wjhsf deleted the W-14337993/a11y-fix-funcs-operable-by-keyboard branch November 21, 2023 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants