function olivero_preprocess_text_format_wrapper in Drupal 9
Implements template_preprocess_text_format_wrapper().
@todo Remove when https://www.drupal.org/node/3016343 is fixed.
File
- core/
themes/ olivero/ olivero.theme, line 586 - Functions to support theming in the Olivero theme.
Code
function olivero_preprocess_text_format_wrapper(&$variables) {
$description_attributes = [];
if (!empty($variables['attributes']['id'])) {
$description_attributes['id'] = $variables['attributes']['aria-describedby'] = $variables['attributes']['id'];
unset($variables['attributes']['id']);
}
$variables['description_attributes'] = new Attribute($description_attributes);
}