From 887ff0e8969cf85ddd17e5df328e261361746ba4 Mon Sep 17 00:00:00 2001 From: Matthew Oliveira Date: Tue, 26 Nov 2024 14:33:35 -0500 Subject: [PATCH] fix(card): remove onclick handler for pictogram (#12123) ### Related Ticket(s) [ADCMS-6850](https://jsw.ibm.com/browse/ADCMS-6850) ### Description Removes an `onclick` handler on cards which is redundant and hinders customization by adopters. The `onlick` handler here is already covered by the `` that has an `::after` pseudo element covering the card and capturing the click event for sighted and non-sighted users. The `onclick` handler was added back in https://github.com/carbon-design-system/carbon-for-ibm-dotcom/pull/6642. ### Changelog **Changed** - Removed `onclick` handler from pictogram cards --- packages/web-components/src/components/card/card.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/web-components/src/components/card/card.ts b/packages/web-components/src/components/card/card.ts index 2c7c9219d04..f1c14c7d56a 100644 --- a/packages/web-components/src/components/card/card.ts +++ b/packages/web-components/src/components/card/card.ts @@ -401,7 +401,6 @@ class C4DCard extends CTAMixin(StableSelectorMixin(CDSLink)) { } if (this._hasPictogram) { - this.onclick = () => window.open(this.href, '_self'); this.setAttribute('pictogram', ''); } else { this.removeAttribute('pictogram');