v0.3.0 - Polish: accessibility, security, performance, RTL, French translation
All checks were successful
Create Release Package / PHP Lint (push) Successful in 52s
Create Release Package / Build Release (push) Successful in 1m21s

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-02-08 16:27:13 +01:00
parent cc8dc9d357
commit eb5ac6f7ad
33 changed files with 1270 additions and 39 deletions

View File

@@ -61,6 +61,7 @@
var newTheme = currentTheme === 'dark' ? 'light' : 'dark';
localStorage.setItem(STORAGE_KEY, newTheme);
setTheme(newTheme);
announceTheme(newTheme);
});
});
});
@@ -71,4 +72,23 @@
setTheme(e.matches ? 'dark' : 'light');
}
});
/**
* Announce theme change to screen readers via a live region.
*
* @param {string} theme - 'dark' or 'light'
*/
function announceTheme(theme) {
var msg = theme === 'dark' ? 'Dark mode enabled' : 'Light mode enabled';
var el = document.getElementById('wp-bootstrap-theme-status');
if (!el) {
el = document.createElement('div');
el.id = 'wp-bootstrap-theme-status';
el.setAttribute('role', 'status');
el.setAttribute('aria-live', 'polite');
el.className = 'visually-hidden';
document.body.appendChild(el);
}
el.textContent = msg;
}
})();