From 83a0764bb74b6ac289499ddc3d68eabe4104d7dd Mon Sep 17 00:00:00 2001 From: Ignacio Becerra Date: Tue, 2 Feb 2021 06:08:03 -0800 Subject: [PATCH] fix(card): add aria-hide to card-copy (#5019) ### Related Ticket(s) #4740 ### Description Follow-up to #4870 to also hide the `card-copy` text from screen readers to avoid unnecessary long description. ### Changelog **New** - added `aria-hidden='true'` to `card-copy` div --- packages/web-components/src/components/card/card.ts | 2 +- packages/web-components/tests/snapshots/dds-card-cta.md | 1 + packages/web-components/tests/snapshots/dds-card.md | 2 ++ .../tests/snapshots/dds-feature-card-block-large.md | 2 ++ packages/web-components/tests/snapshots/dds-feature-card.md | 2 ++ packages/web-components/tests/snapshots/dds-feature-cta.md | 1 + 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/web-components/src/components/card/card.ts b/packages/web-components/src/components/card/card.ts index b6458393346..30c6e006e7a 100644 --- a/packages/web-components/src/components/card/card.ts +++ b/packages/web-components/src/components/card/card.ts @@ -78,7 +78,7 @@ class DDSCard extends StableSelectorMixin(BXLink) { protected _renderCopy(): TemplateResult | string | void { const { _hasCopy: hasCopy } = this; return html` -
+ `; diff --git a/packages/web-components/tests/snapshots/dds-card-cta.md b/packages/web-components/tests/snapshots/dds-card-cta.md index b5700b2e8a1..57b4a43366d 100644 --- a/packages/web-components/tests/snapshots/dds-card-cta.md +++ b/packages/web-components/tests/snapshots/dds-card-cta.md @@ -19,6 +19,7 @@