diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 145691a..d31cca1 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -749,10 +749,10 @@ function template_preprocess_filter_guidelines(&$variables) { * - attributes: An associative array containing properties of the element. */ function template_preprocess_text_format_wrapper(&$variables) { - $variables['description_class'] = FALSE; + $variables['aria_description'] = FALSE; // Add element class and id for screen readers. if (isset($variables['attributes']['aria-describedby'])) { - $variables['description_class'] = TRUE; + $variables['aria_description'] = TRUE; $variables['attributes']['id'] = $variables['attributes']['aria-describedby']; // Remove aria-describedby attribute as it shouldn't be visible here. unset($variables['attributes']['aria-describedby']); diff --git a/core/modules/filter/templates/text-format-wrapper.html.twig b/core/modules/filter/templates/text-format-wrapper.html.twig index 607c38f..4e5ff6d 100644 --- a/core/modules/filter/templates/text-format-wrapper.html.twig +++ b/core/modules/filter/templates/text-format-wrapper.html.twig @@ -7,8 +7,8 @@ * - children: Text format element children. * - description: Text format element description. * - attributes: HTML attributes for the containing element. - * - description_class: Flag for whether or not to add a class to the - * description container. + * - aria_description: Flag for whether or not an ARIA description has been + * added to the description container. * * @see template_preprocess_text_format_wrapper() * @@ -20,7 +20,7 @@ {% if description %} {% set classes = [ - description_class ? 'description', + aria_description ? 'description', ] %} {{ description }}