You are here

alerts.html.twig in Simple Style Guide 8

<a name="alerts"></a>

<h3 class="simple-styleguide--sectionhead">{{ default_pattern }}</h3>

<div class="simple-styleguide">

    <div class="messages__wrapper layout-container">
        <div role="contentinfo" aria-label="Status message"
             class="messages messages--status">
            <h2 class="visually-hidden">Status message</h2>
            This is a status message.
        </div>
        <div role="contentinfo" aria-label="Warning message"
             class="messages messages--warning">
            <h2 class="visually-hidden">Warning message</h2>
            This is a warning message.
        </div>
        <div role="contentinfo" aria-label="Error message"
             class="messages messages--error">
            <div role="alert">
                <h2 class="visually-hidden">Error message</h2>
                This is an error message
            </div>
        </div>

    </div>
</div>

File

templates/includes/alerts.html.twig
View source
  1. <a name="alerts"></a>
  2. <h3 class="simple-styleguide--sectionhead">{{ default_pattern }}</h3>
  3. <div class="simple-styleguide">
  4. <div class="messages__wrapper layout-container">
  5. <div role="contentinfo" aria-label="Status message"
  6. class="messages messages--status">
  7. <h2 class="visually-hidden">Status message</h2>
  8. This is a status message.
  9. </div>
  10. <div role="contentinfo" aria-label="Warning message"
  11. class="messages messages--warning">
  12. <h2 class="visually-hidden">Warning message</h2>
  13. This is a warning message.
  14. </div>
  15. <div role="contentinfo" aria-label="Error message"
  16. class="messages messages--error">
  17. <div role="alert">
  18. <h2 class="visually-hidden">Error message</h2>
  19. This is an error message
  20. </div>
  21. </div>
  22. </div>
  23. </div>