feat: add accessibility
This commit is contained in:
+16
-16
@@ -1,7 +1,7 @@
|
||||
<!-- Sidebar de navigation -->
|
||||
<div class="sidebar">
|
||||
<a href="/" class="logo">
|
||||
<img src="img/logo.png" alt="kaubuntu.re">
|
||||
<nav class="sidebar" role="navigation" aria-label="Navigation principale">
|
||||
<a href="/" class="logo" aria-label="Retour à l'accueil">
|
||||
<img src="img/logo.png" alt="Logo kaubuntu.re">
|
||||
</a>
|
||||
|
||||
<?php
|
||||
@@ -13,12 +13,12 @@
|
||||
$currentTag = $isTagSearch ? substr($currentQuery, 1) : '';
|
||||
?>
|
||||
|
||||
<nav class="sidebar-nav">
|
||||
<a href="/" class="nav-item <?php echo ($currentPage === 'index.php') ? 'active' : ''; ?>" data-title="Accueil">
|
||||
<i class="fas fa-home"></i> <span>Accueil</span>
|
||||
<div class="sidebar-nav">
|
||||
<a href="/" class="nav-item <?php echo ($currentPage === 'index.php') ? 'active' : ''; ?>" data-title="Accueil" aria-current="<?php echo ($currentPage === 'index.php') ? 'page' : 'false'; ?>">
|
||||
<i class="fas fa-home" aria-hidden="true"></i> <span>Accueil</span>
|
||||
</a>
|
||||
<a href="direct.php" class="nav-item <?php echo ($currentPage === 'direct.php') ? 'active' : ''; ?>" data-title="Direct">
|
||||
<i class="fas fa-broadcast-tower"></i> <span>Direct</span>
|
||||
<a href="direct.php" class="nav-item <?php echo ($currentPage === 'direct.php') ? 'active' : ''; ?>" data-title="Direct" aria-current="<?php echo ($currentPage === 'direct.php') ? 'page' : 'false'; ?>">
|
||||
<i class="fas fa-broadcast-tower" aria-hidden="true"></i> <span>Direct</span>
|
||||
</a>
|
||||
|
||||
<div class="nav-divider"></div>
|
||||
@@ -51,8 +51,8 @@
|
||||
foreach (PRIORITY_CATEGORIES as $id => $name) {
|
||||
$isActive = ($currentPage === 'categories.php' && $currentCategoryId === $id);
|
||||
$icon = isset($categoryIcons[$id]) ? $categoryIcons[$id] : 'fas fa-folder';
|
||||
echo '<a href="categories.php?id=' . $id . '" class="nav-item ' . ($isActive ? 'active' : '') . '" data-title="' . htmlspecialchars($name) . '">';
|
||||
echo '<i class="' . $icon . '"></i> <span>' . htmlspecialchars($name) . '</span>';
|
||||
echo '<a href="categories.php?id=' . $id . '" class="nav-item ' . ($isActive ? 'active' : '') . '" data-title="' . htmlspecialchars($name) . '" aria-current="' . ($isActive ? 'page' : 'false') . '">';
|
||||
echo '<i class="' . $icon . '" aria-hidden="true"></i> <span>' . htmlspecialchars($name) . '</span>';
|
||||
echo '</a>';
|
||||
}
|
||||
}
|
||||
@@ -60,8 +60,8 @@
|
||||
|
||||
<div class="nav-divider"></div>
|
||||
|
||||
<div class="category-title">
|
||||
<i class="fas fa-hashtag"></i> <span>Hashtags</span>
|
||||
<div class="category-title" role="heading" aria-level="2">
|
||||
<i class="fas fa-hashtag" aria-hidden="true"></i> <span>Hashtags</span>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@@ -70,12 +70,12 @@
|
||||
$encodedTag = urlencode('#' . $tag);
|
||||
$isActive = ($isTagSearch && strtolower($currentTag) === strtolower($tag));
|
||||
?>
|
||||
<a href="recherche.php?q=<?php echo $encodedTag; ?>" class="tag-item <?php echo $isActive ? 'active' : ''; ?>" data-title="<?php echo htmlspecialchars($tag); ?>">
|
||||
<i class="fas fa-hashtag tag-icon"></i> <span><?php echo htmlspecialchars($tag); ?></span>
|
||||
<a href="recherche.php?q=<?php echo $encodedTag; ?>" class="tag-item <?php echo $isActive ? 'active' : ''; ?>" data-title="<?php echo htmlspecialchars($tag); ?>" aria-current="<?php echo $isActive ? 'page' : 'false'; ?>">
|
||||
<i class="fas fa-hashtag tag-icon" aria-hidden="true"></i> <span><?php echo htmlspecialchars($tag); ?></span>
|
||||
</a>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user