Same thing as that issue but for wetkit_bootstrap. I also improved/simplified the code.
First some context
are a type of element who have multiple elements under a top label.
Some elements, not all of them form-associated, are categorized as labelable elements. These are elements that can be associated with a label element.
input (if the type attribute is not in the Hidden state)
Getting accessibility error because composite elements top Label had a for element linking to a unlabelable element (ex: div).
Once the 'for' element was removed, I was getting accesibility warning about a Label without a for element and no context.
After some digging I noticed there used to be a similar fix for composite elements on webforms (https://www.drupal.org/node/2184761).
The form-element-label.theme.inc file in wetkit_omega had code for #composite element but it was seemingly unused now.
Outcome and fix
I modified form-element-label.theme.inc and now when encountering a composite element label:
- Remove the 'for' element
- Change the top Label element to a span