function claro_preprocess_text_format_wrapper

Same name in other branches
  1. 9 core/themes/claro/claro.theme \claro_preprocess_text_format_wrapper()
  2. 10 core/themes/claro/claro.theme \claro_preprocess_text_format_wrapper()
  3. 11.x core/themes/claro/claro.theme \claro_preprocess_text_format_wrapper()

Implements template_preprocess_text_format_wrapper().

@todo Remove when https://www.drupal.org/node/3016343 is fixed.

File

core/themes/claro/claro.theme, line 282

Code

function claro_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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.