Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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.

8 changes: 1 addition & 7 deletions dist/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Chimera UI Libraries - Build 0.35.9 (6/24/2025, 23:32:01)
* Chimera UI Libraries - Build 0.35.9 (7/7/2025, 11:11:14)
*
*/
/******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -47453,11 +47453,6 @@ var Card = function Card(props) {

var headingAria = videoURL || label || detailText || description || logoSrc || badgeText || hasBanner && !disableBanners || !isIcon ? '' : title;

var ariaText = title;
if (hasBanner && !disableBanners) {
ariaText = bannerDescriptionToUse + ' | ' + ariaText;
}

var linkBlockerTarget = (0, _general.getLinkTarget)(overlayLink, ctaAction);
var addParams = new URLSearchParams(additionalParams);
var overlayParams = additionalParams && addParams.keys().next().value ? overlayLink + '?' + addParams.toString() : overlayLink;
Expand All @@ -47473,7 +47468,6 @@ var Card = function Card(props) {
{
'daa-lh': lh,
className: cardStyle + ' ' + cardClassName,
'aria-label': ariaText,
'data-testid': 'consonant-Card',
id: id },
showHeader && _react2.default.createElement(
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.

6 changes: 0 additions & 6 deletions react/src/js/components/Consonant/Cards/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,6 @@ const Card = (props) => {
const headingAria = (videoURL ||
label || detailText || description || logoSrc || badgeText || (hasBanner && !disableBanners) || !isIcon) ? '' : title;

let ariaText = title;
if (hasBanner && !disableBanners) {
ariaText = `${bannerDescriptionToUse} | ${ariaText}`;
}

const linkBlockerTarget = getLinkTarget(overlayLink, ctaAction);
const addParams = new URLSearchParams(additionalParams);
const overlayParams = (additionalParams && addParams.keys().next().value) ? `${overlayLink}?${addParams.toString()}` : overlayLink;
Expand All @@ -417,7 +412,6 @@ const Card = (props) => {
<div
daa-lh={lh}
className={`${cardStyle} ${cardClassName}`}
aria-label={ariaText}
data-testid="consonant-Card"
id={id}>
{showHeader &&
Expand Down
31 changes: 0 additions & 31 deletions react/src/js/components/Consonant/Cards/__tests__/Card.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,37 +105,6 @@ describe('Card Component - Specific Conditions', () => {
expect(bannerElement).toBeNull();
});

test('should set ariaText correctly when hasBanner is true and disableBanners is false', () => {
const bannerDescription = 'Register Now';
const bannerBackgroundColor = '#000';
const bannerFontColor = '#fff';
const title = 'Card Title';

// Render the card with the necessary props to trigger the condition
renderCard({
cardStyle: 'half-height', // Set card style to half-height
tags: [{ id: '/caas:gated' }], // Add gated tag
isRegistered: false, // Explicitly set to false to test not registered condition
bannerMap: {
register: {
description: bannerDescription,
backgroundColor: bannerBackgroundColor,
fontColor: bannerFontColor,
},
},
contentArea: {
title, // Provide title
},
hasBanner: true,
disableBanners: false, // Ensure disableBanners is false
});

// Check if the ariaText is set correctly
const cardElement = screen.getByTestId('consonant-Card');
const ariaText = `${bannerDescription} | ${title}`;
expect(cardElement).toHaveAttribute('aria-label', ariaText);
});

// Other Test Cases
test('should set detail text for half-height card if current date is before start date', () => {
const currentDate = new Date();
Expand Down
Loading