-
Notifications
You must be signed in to change notification settings - Fork 204
[NO-TICKET] chore: InsetBannerSponsored Enhance Accessibility and Fix duplicate label #3911
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 enhances accessibility for the InsetBannerSponsored component by removing duplicate ARIA labels and ensuring proper screen reader support for logo images.
- Removed duplicate
buttonA11yLabel
property that was redundant with icon ARIA labeling - Removed
aria-hidden
attribute from logo images to allow screen readers to access alt text - Updated type definitions and tests to reflect the removed
buttonA11yLabel
property
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
common-types.ts | Removed buttonA11yLabel property from callToActionType interface |
BpkInsetBannerSponsored.tsx | Removed duplicate aria-label and aria-hidden attributes for better accessibility |
BpkInsetBannerSponsored-test.tsx | Updated test cases to remove references to the deleted buttonA11yLabel property |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/bpk-component-inset-banner/src/BpkInsetBannerV2/BpkInsetBannerSponsored.tsx
Show resolved
Hide resolved
Visit https://backpack.github.io/storybook-prs/3911 to see this build running in a browser. |
d776e14
to
5a90881
Compare
Visit https://backpack.github.io/storybook-prs/3911 to see this build running in a browser. |
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.
LGTM
@@ -86,7 +85,6 @@ const BpkInsetBannerSponsored = ({ | |||
}} | |||
> | |||
<button | |||
aria-label={callToAction?.buttonA11yLabel} |
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.
Hey @hir06 thanks for raising the PR, can you explain more the duplicated places? I didn't quite get the context.
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.
Hey @xiaogliu, instead of showing the entire button, we’d like to move the label to the info icon, as per this Figma design:
https://www.figma.com/design/TPAjVpPBlISl8oLCJinVah/Inline-Plus-%E2%80%A2-Car-Hire?node-id=2373-1219&p=f&m=dev
It was originally added here:
backpack/packages/bpk-component-inset-banner/src/BpkInsetBannerV2/BpkInsetBannerSponsored.tsx
Line 37 in 5a90881
adInfoA11yLabel = '', |
The only thing pending is cleaning up the existing label.
* main: Bump actions/download-artifact in the artifacts-actions group (#3907) Bump actions/checkout from 4 to 5 (#3913) Fix closeText style of BpkModal in dark mode (#3919) Bump the babel group across 1 directory with 5 updates (#3917) Bump @babel/runtime in the npm_and_yarn group across 1 directory (#3884) Bump actions/cache from 4.2.3 to 4.2.4 (#3905) Bump webpack from 5.99.8 to 5.101.2 (#3916) QUAR-1046 Fix CTA Button Alignment, Logo Sizing, and Logo Vertical Alignment in Inset Banner (#3912) chore: removed duplicate aria-label (#3911) [CAPY-1594][BpkNavigationTabGroup/BpkBubble] Create and integrate 'new' bubble tooltip in navigation tab bar (#3909) [CLOV-381][BpkBreakpoint] update bpk breakpoint readme (#3910) [CYB-3904][BpkGraphicPromo] Render wrapper as semantic anchor tag to improve SEO (#3904) [CLOVER-532][BpkText] Add BpkText color prop with leverage css classname (#3900) fix: A11y and icon issue for inset banner sponsored (#3901) # Conflicts: # packages/bpk-component-text/README.md # packages/bpk-component-text/src/BpkText-test.tsx # packages/bpk-component-text/src/BpkText.tsx
Screenshot of changes.
Remember to include the following changes:
[Clover-123][BpkButton] Updating the colour
README.md
(If you have created a new component)README.md