diff --git a/packages/styles/scss/components/feature-card-block-medium/_feature-card-block-medium.scss b/packages/styles/scss/components/feature-card-block-medium/_feature-card-block-medium.scss
index 592bb8c738c..c8f20b1a3ab 100644
--- a/packages/styles/scss/components/feature-card-block-medium/_feature-card-block-medium.scss
+++ b/packages/styles/scss/components/feature-card-block-medium/_feature-card-block-medium.scss
@@ -22,13 +22,18 @@
}
.#{$prefix}--feature-card-block-medium__heading,
- ::slotted(#{$dds-prefix}-feature-card-block-medium-heading) {
+ ::slotted(#{$dds-prefix}-card-heading) {
@include carbon--type-style('expressive-heading-04', true);
display: block;
margin-bottom: $carbon--spacing-07;
}
+ ::slotted(#{$dds-prefix}-card-heading) {
+ width: auto;
+ max-width: none;
+ }
+
&:focus {
outline: none;
}
diff --git a/packages/styles/scss/components/feature-card/_feature-card.scss b/packages/styles/scss/components/feature-card/_feature-card.scss
index 840b6ecfd84..6f36e91d09a 100644
--- a/packages/styles/scss/components/feature-card/_feature-card.scss
+++ b/packages/styles/scss/components/feature-card/_feature-card.scss
@@ -32,7 +32,8 @@
outline-offset: 2px;
}
- .#{$prefix}--card__heading {
+ .#{$prefix}--card__heading,
+ ::slotted(#{$dds-prefix}-card-heading) {
margin-bottom: $layout-03;
}
}
diff --git a/packages/web-components/src/components/card/card-heading.ts b/packages/web-components/src/components/card/card-heading.ts
index ddb8a5e8662..8a7c9dd5b19 100644
--- a/packages/web-components/src/components/card/card-heading.ts
+++ b/packages/web-components/src/components/card/card-heading.ts
@@ -25,6 +25,16 @@ class DDSCardHeading extends LitElement {
@property({ reflect: true })
slot = 'heading';
+ connectedCallback() {
+ if (!this.hasAttribute('role')) {
+ this.setAttribute('role', 'heading');
+ }
+ if (!this.hasAttribute('aria-level')) {
+ this.setAttribute('aria-level', '3');
+ }
+ super.connectedCallback();
+ }
+
render() {
return html`
Habitant morbi tristique senectus et netus et malesuada fames. Habitant morbu tristique.