unreferenced aria-describedby - textarea, related body summary description label

Created on 3 July 2020, over 4 years ago
Updated 13 September 2024, 4 months ago

The body summary description label an attribute in the 'bootstrap' theme, not an element, however the core claro theme does render this as an element. Yet the bootstrap theme still renders the aria-describedby attribute for the related label.

This causes an aria reference missing error in w3c.

Example screenshot:

This is how it looks rendered by claro theme

However, with bootstrap, the text is a tooltip.

I have provided a workaround to pass wcag testing.

Basically removes the aria-describedby attribute from a specific summary element, in this case body summary (for example)

function bootstrap_preprocess_textarea(&$variables) {
  if (is_object($variables['attributes'])) {
    $attribute_obj = $variables['attributes'];
    $attr_array = $attribute_obj->toArray();
    if (isset($attr_array['aria-describedby'])) {
      if ($attr_array['aria-describedby'] == 'edit-body-0-summary--description') {
        $attribute_obj->removeAttribute('aria-describedby');
        $variables['attributes'] = $attribute_obj;
      }
    }
  }
}
🐛 Bug report
Status

Closed: won't fix

Version

3.0

Component

Code

Created by

🇨🇦Canada joseph.olstad

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024