Improve alert accessibility (#9248)

* Improve alert accessibility

* Remove procedure
This commit is contained in:
XLBilly 2025-10-29 20:08:01 +08:00 committed by GitHub
parent 99682c5731
commit 135e685811
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -2,9 +2,9 @@ code-body: yes
title: $:/core/ui/AlertTemplate
\whitespace trim
<div class="tc-alert">
<div class="tc-alert" role="alertdialog">
<div class="tc-alert-toolbar">
<$button class="tc-btn-invisible"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/cancel-button}}</$button>
<$button class="tc-btn-invisible" aria-label={{$:/language/Buttons/Close/Caption}}><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/cancel-button}}</$button>
</div>
<div class="tc-alert-subtitle">
<$wikify name="format" text=<<lingo Tiddler/DateFormat>>>
@ -19,7 +19,7 @@ title: $:/core/ui/AlertTemplate
</$reveal>
</$wikify>
</div>
<div class="tc-alert-body">
<div class="tc-alert-body" role="alert" aria-atomic="true">
<$transclude/>

View file

@ -1,8 +1,8 @@
title: $:/core/ui/PageTemplate/alerts
tags: $:/tags/PageTemplate
<div class="tc-alerts">
<div class="tc-alerts" role="region" aria-label="Alerts">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Alert]!has[draft.of]]" template="$:/core/ui/AlertTemplate" storyview="pop"/>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Alert]!is[draft]]" template="$:/core/ui/AlertTemplate" storyview="pop"/>
</div>