webform-element-more.html.twig in Webform 6.x
Same filename and directory in other branches
Theme implementation for webform element more.
Available variables
- title: More label.
- content: More content.
Based on WAI-ARIA Authoring Practices 1.1: Disclosure (Show/Hide)
See also
https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure
https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclos...
1 theme call to webform-element-more.html.twig
- WebformMore::getInfo in src/
Element/ WebformMore.php - Returns the element properties for this element.
File
templates/webform-element-more.html.twigView source
- {#
- /**
- * @file
- * Theme implementation for webform element more.
- *
- * Available variables
- * - title: More label.
- * - content: More content.
- *
- * Based on WAI-ARIA Authoring Practices 1.1: Disclosure (Show/Hide)
- *
- * @see https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure
- * @see https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html
- * @see template_preprocess_webform_element_more()
- * @ingroup themeable
- */
- #}
- {{ attach_library('webform/webform.element.more') }}
- {%
- set classes = [
- 'js-webform-element-more',
- 'webform-element-more',
- ]
- %}
- <div{{ attributes.addClass(classes) }}>
- <div class="webform-element-more--link"><a role="button" href="#{{ attributes.id }}--content">{{ more_title }}</a></div>
- <div id="{{ attributes.id }}--content" class="webform-element-more--content">{{ more }}</div>
- </div>