You are here

webform-element-more.html.twig in Webform 6.x

Same filename and directory in other branches
  1. 8.5 templates/webform-element-more.html.twig

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)

File

templates/webform-element-more.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme implementation for webform element more.
  5. *
  6. * Available variables
  7. * - title: More label.
  8. * - content: More content.
  9. *
  10. * Based on WAI-ARIA Authoring Practices 1.1: Disclosure (Show/Hide)
  11. *
  12. * @see https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure
  13. * @see https://www.w3.org/TR/wai-aria-practices-1.1/examples/disclosure/disclosure-faq.html
  14. * @see template_preprocess_webform_element_more()
  15. * @ingroup themeable
  16. */
  17. #}
  18. {{ attach_library('webform/webform.element.more') }}
  19. {%
  20. set classes = [
  21. 'js-webform-element-more',
  22. 'webform-element-more',
  23. ]
  24. %}
  25. <div{{ attributes.addClass(classes) }}>
  26. <div class="webform-element-more--link"><a role="button" href="#{{ attributes.id }}--content">{{ more_title }}</a></div>
  27. <div id="{{ attributes.id }}--content" class="webform-element-more--content">{{ more }}</div>
  28. </div>