1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

Add alert role to notifications so they're automatically spoken by screen readers. (#6743)

This commit is contained in:
Nolan Darilek 2022-06-28 11:48:03 -05:00 committed by GitHub
parent f02bd2392f
commit 7ac7d26f86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,8 +36,9 @@ Notifier.prototype.display = function(title,options) {
if(!tiddler) {
return;
}
// Add classes
// Add classes and roles
$tw.utils.addClass(notification,"tc-notification");
notification.setAttribute("role","alert");
// Create the variables
var variables = $tw.utils.extend({currentTiddler: title},options.variables);
// Render the body of the notification