Problem/Motivation
There's an issue with the tooltip display of descriptions, when elements are inside fieldsets. This applies at least to the various different checkboxes and radios elements. On these elements the tooltip is appearing empty.

This is happening because webform.tooltip.js is trying to retrieve the description value from '> .fieldset-wrapper > .description > .webform-element-description.visually-hidden', and the actual markup places the visually-hidden description inside of a fieldset suffix (see screenshot).

Core version: 9.5.7
Webform version: 6.1.4 (and 6.2.0-beta5)
Theme: Olivero (and others)
Notes
1. Depending on a theme, the fieldset suffix has a different selector in fieldset.html.twig. For newer themes like Claro and Olivero the suffix class is .fieldset__wrapper > .fieldset__suffix, but for most themes, the class is .fieldset-wrapper > .field-suffix
2. This one is likely its own issue completely: The tooltip descriptions for other elements is passed through webform-html-editor-markup.html.twig template but for these elements that doesn't happen for some reason. The current checkboxes/radios markup is formatted through WYSIWYG, when compared to the properly working ones that are stripped from tags (for a good reason for tooltips).
Proposed resolution
Change the tooltip description selector to one that can be found on the page.
Remaining tasks
None
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3352639-8.patch | 911 bytes | jrockowitz |
| #5 | webform.webform.new_webform_abc.yml | 5.92 KB | isampo |
| #2 | webform-fieldset-tooltip-markup-3352639-1.patch | 795 bytes | isampo |
Comments
Comment #2
isampo commentedHere's a patch for updating the selectors, which should work for newer and older style fieldset templates.
Comment #3
isampo commentedComment #4
cilefen commentedCan you please post the YAML of an example form?
Comment #5
isampo commentedHere's the YAML export.
Comment #6
isampo commentedAlso it looks like that the single checkboxes inside checkbox groups get the empty tooltip as well, even though single options only have "Description" and "Helptext" values available for the "Options description display" select.
Comment #7
jrockowitz commentedComment #8
jrockowitz commentedThe attached patch adds the new class names and handles empty (checkbox) descriptions.
Comment #9
rajneeshb commentedTested patch #8 this patch fixes the issues reported at #6. Its working fine.
Comment #10
jrockowitz commentedComment #12
liam morland