Compare commits
2 Commits
7be9453762
...
58f8164db4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58f8164db4 | ||
|
|
5d5e58ae09 |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "twitch-vod-manager",
|
"name": "twitch-vod-manager",
|
||||||
"version": "4.6.66",
|
"version": "4.6.67",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "twitch-vod-manager",
|
"name": "twitch-vod-manager",
|
||||||
"version": "4.6.66",
|
"version": "4.6.67",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.6.0",
|
"axios": "^1.6.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "twitch-vod-manager",
|
"name": "twitch-vod-manager",
|
||||||
"version": "4.6.66",
|
"version": "4.6.67",
|
||||||
"description": "Twitch VOD Manager - Download Twitch VODs easily",
|
"description": "Twitch VOD Manager - Download Twitch VODs easily",
|
||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
"author": "xRangerDE",
|
"author": "xRangerDE",
|
||||||
|
|||||||
@ -689,14 +689,28 @@ function showAppToast(message: string, type: 'info' | 'warn' = 'info'): void {
|
|||||||
toast = document.createElement('div');
|
toast = document.createElement('div');
|
||||||
toast.id = 'appToast';
|
toast.id = 'appToast';
|
||||||
toast.className = 'app-toast';
|
toast.className = 'app-toast';
|
||||||
|
// Live region — screen readers announce the toast text whenever
|
||||||
|
// it changes. Warn toasts go through aria-live="assertive" so the
|
||||||
|
// reader interrupts whatever it was speaking; info toasts use
|
||||||
|
// "polite" so they wait for a natural break in current speech.
|
||||||
|
toast.setAttribute('role', 'status');
|
||||||
|
toast.setAttribute('aria-live', 'polite');
|
||||||
|
toast.setAttribute('aria-atomic', 'true');
|
||||||
document.body.appendChild(toast);
|
document.body.appendChild(toast);
|
||||||
}
|
}
|
||||||
|
|
||||||
toast.textContent = message;
|
|
||||||
toast.classList.remove('warn', 'show');
|
toast.classList.remove('warn', 'show');
|
||||||
if (type === 'warn') {
|
if (type === 'warn') {
|
||||||
toast.classList.add('warn');
|
toast.classList.add('warn');
|
||||||
|
toast.setAttribute('role', 'alert');
|
||||||
|
toast.setAttribute('aria-live', 'assertive');
|
||||||
|
} else {
|
||||||
|
toast.setAttribute('role', 'status');
|
||||||
|
toast.setAttribute('aria-live', 'polite');
|
||||||
}
|
}
|
||||||
|
// Setting textContent AFTER the aria-live attribute is in place
|
||||||
|
// ensures the change is captured as a live-region update by AT.
|
||||||
|
toast.textContent = message;
|
||||||
|
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
toast?.classList.add('show');
|
toast?.classList.add('show');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user