Skip to content

Commit f79e4d1

Browse files
authored
fix(a11y): inline placeholder title uses <p>, not <h4> (#482)
The inline placeholder for blocked third-party embeds (YouTube, Vimeo, …) hard-wired a <h4> element for the service title. When the placeholder is rendered inside arbitrary page content, this almost always breaks the document outline (a <section> already running on <h2>/<h3> suddenly contains a stray <h4> with no parent heading). Lighthouse and other a11y audits flag this as a heading-order issue. Switches the tag to <p> so it no longer participates in the heading outline, but keeps the existing .consent-inline-title class plus the Bootstrap-style .h4 utility class. Themes/styles that already target the class or .h4 typography stay visually identical; no CSS change needed (consent_inline.css selectors are class-based). Themes that *do* want a real heading can still override the fragment locally via theme/private/fragments/ConsentManager/inline_placeholder.php.
1 parent 4a885ca commit f79e4d1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fragments/ConsentManager/inline_placeholder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class="consent-inline-thumbnail"
7979
}
8080
?>
8181
</div>
82-
<h4 class="consent-inline-title"><?= rex_escape($options['title'] ?? $service['service_name'] ?? $inline_title_fallback) ?></h4>
82+
<p class="consent-inline-title h4"><?= rex_escape($options['title'] ?? $service['service_name'] ?? $inline_title_fallback) ?></p>
8383
<p class="consent-inline-notice"><?= rex_escape($options['privacy_notice'] ?? (isset($service['placeholder_text']) && '' !== $service['placeholder_text'] ? $service['placeholder_text'] : $inline_privacy_notice)) ?></p>
8484
<p class="consent-inline-action-text"><?= rex_escape($inline_action_text) ?></p>
8585

0 commit comments

Comments
 (0)