diff --git a/site-beginner/templates/_func.php b/site-beginner/templates/_func.php index 7e6369c2..40dbde4c 100644 --- a/site-beginner/templates/_func.php +++ b/site-beginner/templates/_func.php @@ -30,7 +30,7 @@ function renderNav(PageArray $items) { // render markup for each navigation item as an
  • if($item->id == wire('page')->id) { // if current item is the same as the page being viewed, add a "current" class to it - echo "
  • "; + echo "
  • "; } else { // otherwise just a regular list item echo "
  • "; @@ -76,7 +76,7 @@ function renderNavTree($items, $maxDepth = 3) { // if current item is the same as the page being viewed, add a "current" class and // visually hidden text for screen readers to it if($item->id == wire('page')->id) { - echo "
  • Current page: "; + echo "
  • Current page: "; } else { echo "
  • "; } diff --git a/site-beginner/templates/_head.php b/site-beginner/templates/_head.php index 4b2a152d..533433d8 100644 --- a/site-beginner/templates/_head.php +++ b/site-beginner/templates/_head.php @@ -25,7 +25,7 @@ if($child->id == $page->rootParent->id) { // this $child page is currently being viewed (or one of it's children/descendents) // so we highlight it as the current page in the navigation - echo "
  • Current page: $child->title
  • "; + echo "
  • Current page: $child->title
  • "; } else { echo "
  • $child->title
  • "; } diff --git a/site-classic/templates/head.inc b/site-classic/templates/head.inc index 8660ac3e..04d900f0 100644 --- a/site-classic/templates/head.inc +++ b/site-classic/templates/head.inc @@ -64,9 +64,10 @@ if ($child === $page->rootParent) { $class = " class='on'"; $indicator = "Current page: "; + $ariaState = " aria-current='true' "; } $class = $child === $page->rootParent ? " class='on'" : ''; - echo "
  • $indicator{$child->title}
  • "; + echo "
  • $indicator{$child->title}
  • "; } ?> @@ -140,7 +141,8 @@ foreach($page->rootParent->children as $child) { $class = $page === $child ? " class='on'" : ''; - echo "
  • {$child->title}
  • "; + $ariaState = $page === $child ? " aria-current='true' " : ''; + echo "
  • {$child->title}
  • "; } echo ""; diff --git a/site-default/templates/_main.php b/site-default/templates/_main.php index f24e7f72..c5a8b0ef 100644 --- a/site-default/templates/_main.php +++ b/site-default/templates/_main.php @@ -48,7 +48,7 @@ // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { if($item->id == $page->rootParent->id) { - echo "
  • Current page: "; + echo "
  • Current page: "; } else { echo "
  • "; } diff --git a/site-languages/templates/_main.php b/site-languages/templates/_main.php index d8376e42..f4810aeb 100644 --- a/site-languages/templates/_main.php +++ b/site-languages/templates/_main.php @@ -82,7 +82,7 @@ // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { if($item->id == $page->rootParent->id) { - echo "
  • " . _x('Current page:', 'navigation') . " "; + echo "
  • " . _x('Current page:', 'navigation') . " "; } else { echo "
  • "; }