From 32661c8f5afe4bf392dc057e5d69e88df3b40867 Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Wed, 27 Sep 2023 11:51:16 +0200 Subject: [PATCH 1/2] hide the asterisk on empty headings --- functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions.php b/functions.php index ba4c48fe..acf65015 100644 --- a/functions.php +++ b/functions.php @@ -129,6 +129,14 @@ function twentytwentyfour_block_styles() { clip-path: path('M11.93.684v8.039l5.633-5.633 1.216 1.23-5.66 5.66h8.04v1.737H13.2l5.701 5.701-1.23 1.23-5.742-5.742V21h-1.737v-8.094l-5.77 5.77-1.23-1.217 5.743-5.742H.842V9.98h8.162l-5.701-5.7 1.23-1.231 5.66 5.66V.684h1.737Z'); display: block; } + + .is-style-asterisk:empty:before { + content: none; + } + + .is-style-asterisk:-moz-only-whitespace:before { + content: none; + } .is-style-asterisk.has-text-align-center:before { margin: 0 auto; From 72e85f931dec9536327b72990e82f5c0e8cffda4 Mon Sep 17 00:00:00 2001 From: Jessica Lyschik Date: Mon, 2 Oct 2023 16:32:09 +0200 Subject: [PATCH 2/2] Add comment for CSS --- functions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/functions.php b/functions.php index acf65015..81e5235c 100644 --- a/functions.php +++ b/functions.php @@ -130,6 +130,7 @@ function twentytwentyfour_block_styles() { display: block; } + /* Hide the asterisk if the heading has no content, to avoid using empty headings to display the asterisk only, which is an A11Y issue */ .is-style-asterisk:empty:before { content: none; }