Commit 2522f598 authored by Robert Lyon's avatar Robert Lyon
Browse files

Accessible hidden text added to group admin nav link (Bug #1265097)



So that 'Groups' reads out as either 'Administer groups' for those
screenreaders that respect aria-hidden or 'Groups (Administer groups)'
in admin section when dropdown navigation is off to differentiate it
from the 'Groups' in main section.

When the dropdown is on the submenu list is read out so easily
indicates where one is already.

Change-Id: Ia70d742e8940fa6ec35957c97588a2ad719a62df
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent a17f0f8c
......@@ -2026,6 +2026,7 @@ function admin_nav() {
'path' => 'managegroups',
'url' => 'admin/groups/groups.php',
'title' => get_string('groups', 'admin'),
'accessibletitle' => get_string('administergroups', 'admin'),
'weight' => 40,
'accesskey' => 'g',
),
......@@ -2233,6 +2234,7 @@ function institutional_admin_nav() {
'path' => 'managegroups',
'url' => 'admin/groups/uploadcsv.php',
'title' => get_string('groups', 'admin'),
'accessibletitle' => get_string('administergroups', 'admin'),
'weight' => 20,
'accesskey' => 'g',
),
......
......@@ -5,7 +5,7 @@
<ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}">
{strip}
{foreach from=$MAINNAV item=item}
<li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} selected{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}"><span><a href="{$WWWROOT}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if} class="{if $item.path}{$item.path}{else}dashboard{/if}">{$item.title}{if $DROPDOWNMENU && $item.submenu} <span class="accessible-hidden">({str tag=dropdownmenu})</span>{/if}</a></span>
<li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} selected{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}"><span><a href="{$WWWROOT}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if} class="{if $item.path}{$item.path}{else}dashboard{/if}">{if $item.accessibletitle && !$DROPDOWNMENU}<span aria-hidden="true" role="presentation">{/if}{$item.title}{if $item.accessibletitle && !$DROPDOWNMENU}</span> <span class="accessible-hidden">({$item.accessibletitle})</span>{/if}{if $DROPDOWNMENU && $item.submenu} <span class="accessible-hidden">({str tag=dropdownmenu})</span>{/if}</a></span>
{if $item.submenu}
<ul class="{if $DROPDOWNMENU}dropdown-sub {/if}rd-subnav">
{strip}
......
......@@ -5,7 +5,7 @@
<ul id="{if $DROPDOWNMENU}dropdown-nav{else}nav{/if}">
{strip}
{foreach from=$MAINNAV item=item}
<li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} selected{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}"><span><a href="{$WWWROOT}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if} class="{if $item.path}{$item.path}{else}dashboard{/if}">{$item.title}{if $DROPDOWNMENU && $item.submenu} <span class="accessible-hidden">({str tag=dropdownmenu})</span>{/if}</a></span>
<li class="{if $item.path}{$item.path}{else}dashboard{/if}{if $item.selected} selected{/if}{if $DROPDOWNMENU} dropdown-nav-home{/if}"><span><a href="{$WWWROOT}{$item.url}"{if $item.accesskey} accesskey="{$item.accesskey}"{/if} class="{if $item.path}{$item.path}{else}dashboard{/if}">{if $item.accessibletitle && !$DROPDOWNMENU}<span aria-hidden="true" role="presentation">{/if}{$item.title}{if $item.accessibletitle && !$DROPDOWNMENU}</span> <span class="accessible-hidden">({$item.accessibletitle})</span>{/if}{if $DROPDOWNMENU && $item.submenu} <span class="accessible-hidden">({str tag=dropdownmenu})</span>{/if}</a></span>
{if $DROPDOWNMENU}{if $item.submenu}
<ul class="dropdown-sub">
{strip}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment