function ClaroHooks::preprocessTextFormatWrapper
Implements hook_preprocess_HOOK().
@todo Remove when https://www.drupal.org/node/3016343 is fixed.
Attributes
#[Hook('preprocess_text_format_wrapper')]
File
-
core/
themes/ claro/ src/ Hook/ ClaroHooks.php, line 1571
Class
- ClaroHooks
- Hook implementations for claro.
Namespace
Drupal\claro\HookCode
public function preprocessTextFormatWrapper(&$variables) : void {
$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.