-
Notifications
You must be signed in to change notification settings - Fork 203
[QUAR-1014] fix: A11y and icon issue for inset banner sponsored #3901
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses accessibility and icon display issues in the inset banner sponsored component. It adds accessibility labels for better screen reader support and fixes an icon display bug where info icons were incorrectly shown for single bottom sheet items.
- Added accessibility label props for ad info and scenic elements
- Fixed conditional rendering of info icons to only appear when there are multiple bottom sheet items
- Added comprehensive test coverage for the new functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
common-types.ts | Adds new optional accessibility label props |
BpkInsetBannerSponsored.tsx | Implements accessibility labels and fixes icon conditional rendering |
BpkInsetBannerSponsored-test.tsx | Adds test coverage for icon display logic |
stories.ts | Exports new story for single bottom sheet item scenario |
examples.tsx | Adds example component demonstrating single bottom sheet item behavior |
packages/bpk-component-inset-banner/src/BpkInsetBannerV2/BpkInsetBannerSponsored.tsx
Outdated
Show resolved
Hide resolved
Visit https://backpack.github.io/storybook-prs/3901 to see this build running in a browser. |
Visit https://backpack.github.io/storybook-prs/3901 to see this build running in a browser. |
adInfoA11yLabel, | ||
ariaAdScenicA11yLabel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: would it better if we set the default value ''
here rather than repeatedly using aria-label={adInfoA11yLabel || ''}
in the JSX. Here’s why:
it would make the JSX cleaner and centralised at the top of your function, making it more maintainable.
What do you think?
Visit https://backpack.github.io/storybook-prs/3901 to see this build running in a browser. |
Context
#Changes
Remember to include the following changes:
[Clover-123][BpkButton] Updating the colour
README.md
(If you have created a new component)README.md