From 0d72593a7c4872de5c73a739e40d64748acec7ab Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Fri, 10 Aug 2018 16:54:36 +0800 Subject: [PATCH] MDL-62143 accessibility: Label breadcrumbs --- lib/outputrenderers.php | 3 +++ theme/boost/templates/core/navbar.mustache | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 7181ffee7a8..bbbf2e09132 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -3579,6 +3579,9 @@ EOD; if ($item->hidden) { $attributes['class'] = 'dimmed_text'; } + if ($item->is_last()) { + $attributes['aria-current'] = 'page'; + } $content = html_writer::tag('span', $content, array('itemprop' => 'title')); $content = html_writer::link($item->action, $content, $attributes); diff --git a/theme/boost/templates/core/navbar.mustache b/theme/boost/templates/core/navbar.mustache index 07d0c0404aa..2998888315e 100644 --- a/theme/boost/templates/core/navbar.mustache +++ b/theme/boost/templates/core/navbar.mustache @@ -63,12 +63,12 @@ ] } }} -