1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-31 10:21:44 +02:00

Use aria-current also in built in site profiles

This commit is contained in:
mhe
2016-11-27 17:10:22 +01:00
parent 7038b787f0
commit 016290192f
5 changed files with 9 additions and 7 deletions

View File

@@ -64,9 +64,10 @@
if ($child === $page->rootParent) {
$class = " class='on'";
$indicator = "<span class='visually-hidden'>Current page: </span>";
$ariaState = " aria-current='true' ";
}
$class = $child === $page->rootParent ? " class='on'" : '';
echo "<li><a$class href='{$child->url}'>$indicator{$child->title}</a></li>";
echo "<li><a$class$ariaState href='{$child->url}'>$indicator{$child->title}</a></li>";
}
?></ul>
@@ -140,7 +141,8 @@
foreach($page->rootParent->children as $child) {
$class = $page === $child ? " class='on'" : '';
echo "<li><a$class href='{$child->url}'>{$child->title}</a></li>";
$ariaState = $page === $child ? " aria-current='true' " : '';
echo "<li><a$class$ariaState href='{$child->url}'>{$child->title}</a></li>";
}
echo "</ul>";