mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
admin nav: replace bare <a> links with <ul>/<li>, use aria-current instead of .active class
- templates/admin/head.php: all 7 nav links (+ conditional Modifier + Déconnexion) wrapped in <ul class="admin-nav__list">/<li>; .active class removed, replaced with aria-current="page" on each <a> based on $currentPage match - Déconnexion link: removed inline style="margin-left:auto;opacity:.6;"; moved to new .admin-nav__logout <li> class in admin.css - public/assets/admin.css: replaced .admin-nav__link rules with .admin-nav__list a selectors; added .admin-nav__list (flex list, gap 2.5rem, flex:1); added .admin-nav__list a[aria-current="page"] rule (border-bottom underline indicator); added .admin-nav__logout / .admin-nav__logout a for the push-right logout item - Removes .admin-nav__link class entirely from the codebase (was only used in templates/admin/head.php and admin.css) Fixes WCAG 2.4.6 (nav landmark content model), 1.4.1 (colour-only active indicator), and section VIII of the semantic HTML admin audit.
This commit is contained in:
@@ -47,7 +47,18 @@ html, body {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.admin-nav__link {
|
||||
/* Nav link list */
|
||||
.admin-nav__list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2.5rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.admin-nav__list a {
|
||||
font-size: 0.85rem;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
@@ -57,10 +68,28 @@ html, body {
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.admin-nav__link:hover,
|
||||
.admin-nav__link.active {
|
||||
.admin-nav__list a:hover,
|
||||
.admin-nav__list a[aria-current="page"] {
|
||||
opacity: 1;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.admin-nav__list a[aria-current="page"] {
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.6);
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
/* Logout link pushed to the far right */
|
||||
.admin-nav__logout {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.admin-nav__logout a {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.admin-nav__logout a:hover {
|
||||
opacity: 1;
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
/* Main content area */
|
||||
|
||||
Reference in New Issue
Block a user