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(MWPW-164129): adds fallback to Logo image ALT attribute #213

Merged
merged 1 commit into from
Dec 18, 2024
Merged
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
2 changes: 1 addition & 1 deletion dist/app.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Chimera UI Libraries - Build 0.23.25 (12/12/2024, 14:19:59)
* Chimera UI Libraries - Build 0.23.26 (12/16/2024, 17:15:29)
*
*/
/******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -47197,7 +47197,7 @@ var Card = function Card(props) {
_react2.default.createElement('img', {
// the text card uses the image as logo
src: isText ? image : logoSrc,
alt: isText ? altText : logoAlt,
alt: isText ? altText : logoAlt || 'Logo',
loading: 'lazy',
width: '32' })
),
Expand All @@ -47208,7 +47208,7 @@ var Card = function Card(props) {
className: 'consonant-Card-logo' },
_react2.default.createElement('img', {
src: cardIcon,
alt: iconAlt,
alt: iconAlt || 'Logo',
loading: 'lazy',
width: '32',
'data-testid': 'consonant-Card-logoImg' })
Expand Down
4 changes: 2 additions & 2 deletions dist/main.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main.source.js

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions react/src/js/components/Consonant/Cards/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,36 +115,36 @@ const Card = (props) => {
},
contentArea: {
title,
detailText: label,
description,
dateDetailText: {
startTime = '',
endTime = '',
} = {},
} = {},
overlays: {
banner: {
description: bannerDescription,
fontColor: bannerFontColor,
backgroundColor: bannerBackgroundColor,
icon: bannerIcon,
} = {},
videoButton: {
url: videoURL,
} = {},
logo: {
src: logoSrc,
alt: logoAlt,
backgroundColor: logoBg,
borderColor: logoBorderBg,
} = {},
label: {
description: badgeText,
} = {},
} = {},
renderBorder,
renderDivider,
renderOverlay,
detailText: label,
description,
dateDetailText: {
startTime = '',
endTime = '',
} = {},
} = {},
overlays: {
banner: {
description: bannerDescription,
fontColor: bannerFontColor,
backgroundColor: bannerBackgroundColor,
icon: bannerIcon,
} = {},
videoButton: {
url: videoURL,
} = {},
logo: {
src: logoSrc,
alt: logoAlt,
backgroundColor: logoBg,
borderColor: logoBorderBg,
} = {},
label: {
description: badgeText,
} = {},
} = {},
renderBorder,
renderDivider,
renderOverlay,
overlayLink,
hideCTA,
startDate,
Expand Down Expand Up @@ -318,13 +318,13 @@ const Card = (props) => {
detailText = prettyFormatDate(startDate, endDate, locale, i18nFormat);
}
}
}

// Events card custom banners
/* istanbul ignore if */
if (isEventsCard) {
hideBanner = isInPerson && eventBanner === bannerMap.onDemand;
bannerDescriptionToUse = isInPerson && eventBanner === bannerMap.live
}
// Events card custom banners
/* istanbul ignore if */
if (isEventsCard) {
hideBanner = isInPerson && eventBanner === bannerMap.onDemand;
bannerDescriptionToUse = isInPerson && eventBanner === bannerMap.live
? 'Live Today'
: bannerDescriptionToUse;
}
Expand Down Expand Up @@ -415,7 +415,7 @@ const Card = (props) => {
<img
// the text card uses the image as logo
src={isText ? image : logoSrc}
alt={isText ? altText : logoAlt}
alt={isText ? altText : logoAlt || 'Logo'}
loading="lazy"
width="32" />
</div>
Expand All @@ -426,7 +426,7 @@ const Card = (props) => {
className="consonant-Card-logo">
<img
src={cardIcon}
alt={iconAlt}
alt={iconAlt || 'Logo'}
loading="lazy"
width="32"
data-testid="consonant-Card-logoImg" />
Expand Down
Loading