From e9e73c726fe2541972a529d47c4f51e8f5450f15 Mon Sep 17 00:00:00 2001 From: "cmd.prompt" Date: Fri, 21 Aug 2026 16:03:13 -0500 Subject: [PATCH 1/3] Update dcf-card-as-link.js removed id code, there were no methods in here that used/required ids be present on the card or link elements. there is no reason to require it. a clickable container with nested links is semantically confusing, should be only one link. included branch such that the decorator `.dcf-card-link` is not necessary ( but still supported if its present ) --- js/components/dcf-card-as-link.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/js/components/dcf-card-as-link.js b/js/components/dcf-card-as-link.js index e866289c..107d2094 100644 --- a/js/components/dcf-card-as-link.js +++ b/js/components/dcf-card-as-link.js @@ -1,10 +1,6 @@ -import { uuidv4 } from '../dcf-utility.js'; - // Based on https://inclusive-components.design/cards/ // Using mousedown and mouseup to allow selecting text without trigger click export default class DCFCardAsLink { - uuid = uuidv4(); - card = null; link = null; @@ -20,13 +16,10 @@ export default class DCFCardAsLink { // Set up the Card as Link component constructor(card) { this.card = card; - if (this.card.getAttribute('id') === '' || this.card.getAttribute('id') === null) { - this.card.setAttribute('id', this.uuid.concat('-card-as-link')); - } this.link = card.querySelector('.dcf-card-link'); - if (this.link.getAttribute('id') === '' || this.link.getAttribute('id') === null) { - this.link.setAttribute('id', this.uuid.concat('-card-as-link-link')); + if (!this.link) { + this.link = card.querySelector('a'); } // Add event listeners only if a link is present in the card From 5f57f7c8ee00e70beafc8a7cdf5b890aa449886b Mon Sep 17 00:00:00 2001 From: "cmd.prompt" Date: Fri, 21 Aug 2026 16:25:25 -0500 Subject: [PATCH 2/3] Update dcf-card-as-link.js --- js/components/dcf-card-as-link.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/components/dcf-card-as-link.js b/js/components/dcf-card-as-link.js index 107d2094..a90bea10 100644 --- a/js/components/dcf-card-as-link.js +++ b/js/components/dcf-card-as-link.js @@ -17,10 +17,7 @@ export default class DCFCardAsLink { constructor(card) { this.card = card; - this.link = card.querySelector('.dcf-card-link'); - if (!this.link) { - this.link = card.querySelector('a'); - } + this.link = card.querySelector('.dcf-card-link') || card.querySelector('a); // Add event listeners only if a link is present in the card if (this.link) { From 1ecb8c21fa901abdd4a876f010dc3a5d97dc5b80 Mon Sep 17 00:00:00 2001 From: "cmd.prompt" Date: Fri, 21 Aug 2026 16:26:23 -0500 Subject: [PATCH 3/3] Update dcf-card-as-link.js --- js/components/dcf-card-as-link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/dcf-card-as-link.js b/js/components/dcf-card-as-link.js index a90bea10..ab946f9d 100644 --- a/js/components/dcf-card-as-link.js +++ b/js/components/dcf-card-as-link.js @@ -17,7 +17,7 @@ export default class DCFCardAsLink { constructor(card) { this.card = card; - this.link = card.querySelector('.dcf-card-link') || card.querySelector('a); + this.link = card.querySelector('.dcf-card-link') || card.querySelector('a'); // Add event listeners only if a link is present in the card if (this.link) {