mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
Replace .admin-alert BEM classes with semantic role/data-type attributes
- admin.css: replace .admin-alert / .admin-alert--error / .admin-alert--success
selectors with [role="alert"][data-type="error"] and [role="status"][data-type="success"]
- All 10 admin templates updated: <div class="admin-alert admin-alert--{type}">
becomes <p role="alert|status" data-type="error|success"> (or <div> for the
import.php multi-item list that contains a <ul>)
- flash-messages.php partial updated to match
- WCAG benefit: role="alert" is an ARIA live region — errors are announced
immediately by screen readers without focus movement (fixes WCAG 3.3.1, 4.1.2)
- role="status" (polite live region) used for success messages — announced
without interrupting the user
- Removes two BEM modifier classes; CSS now targets element semantics directly
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
$_flash = App::consumeFlash();
|
||||
?>
|
||||
<?php if ($_flash['error']): ?>
|
||||
<div class="admin-alert admin-alert--error">⚠ <?= htmlspecialchars($_flash['error']) ?></div>
|
||||
<p role="alert" data-type="error">⚠ <?= htmlspecialchars($_flash['error']) ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if ($_flash['success']): ?>
|
||||
<div class="admin-alert admin-alert--success">✓ <?= htmlspecialchars($_flash['success']) ?></div>
|
||||
<p role="status" data-type="success">✓ <?= htmlspecialchars($_flash['success']) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user