docs-matrix-spec/layouts/partials/alert.html
Kévin Commaille f819403bd5
Change the accessible role of info boxes to note (#2022)
The `alert` role is intrusive and should only be used when the user's immediate attention is required.

Given that this boxes only provide additional content to the current paragraph,
the `note` role seems more appropriate.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-12-10 22:59:29 +00:00

20 lines
575 B
HTML

{{/*
Display an alert box of the given type, containing the given content.
Supported types are "warning", "info", and "rationale".
The type determines the colors used in the box and, by default,
the title for the box: WARNING, INFO, RATIONALE.
By passing "omit_title", a caller can suppress the title, and just get
a box using the colors and styles for the given type.
*/}}
{{ $type := .type}}
{{ $content := .content}}
{{ $omit_title := .omit_title }}
<div class="alert {{ $type }} {{ if $omit_title }}omit-title{{end}}" role="note">
{{ $content }}
</div>