Skip to content

Commit

Permalink
Change the accessible role of info boxes to note (#2022)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
zecakeh authored Dec 10, 2024
1 parent 7867ebb commit f819403
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelogs/internal/newsfragments/2022.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Change the accessible role of info boxes to `note`.
2 changes: 1 addition & 1 deletion layouts/partials/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
{{ $content := .content}}
{{ $omit_title := .omit_title }}

<div class="alert {{ $type }} {{ if $omit_title }}omit-title{{end}}" role="alert">
<div class="alert {{ $type }} {{ if $omit_title }}omit-title{{end}}" role="note">
{{ $content }}
</div>

0 comments on commit f819403

Please sign in to comment.