mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-75055 templates: Apply the .alert-dismissible class
- Apply the .alert-dismissible class for notification alerts with close button to fix its positioning. As an added bonus, the .alert-dismissible class also enlarges the clickable area of the close button which is great for accessibility. - Improve example context for the notification alerts templates.
This commit is contained in:
parent
3ce2cde773
commit
453c3ac47d
@ -34,9 +34,14 @@
|
||||
* announce Whether the notification should be announced to screen readers.
|
||||
|
||||
Example context (json):
|
||||
{ "message": "Your pants are on fire!", "closebutton": 1, "announce": 1, "extraclasses": "foo bar"}
|
||||
{
|
||||
"message": "<p>Hello <a href=\"#\">World!</a></p><p>Your pants are on fire!</p>",
|
||||
"closebutton": 1,
|
||||
"announce": 1,
|
||||
"extraclasses": "foo bar"
|
||||
}
|
||||
}}
|
||||
<div class="alert {{$alertclass}}alert-secondary{{/alertclass}} alert-block fade in {{ extraclasses }}" {{!
|
||||
<div class="alert {{$alertclass}}alert-secondary{{/alertclass}} alert-block fade in {{ extraclasses }} {{#closebutton}}alert-dismissible{{/closebutton}}" {{!
|
||||
}}{{# announce }} role="alert" data-aria-autofocus="true"{{/ announce }}>
|
||||
{{{ message }}}
|
||||
{{# closebutton }}{{!
|
||||
|
Loading…
x
Reference in New Issue
Block a user