[Rt-commit] rt branch, 4.0/screenreader-menus, created. rt-4.0.22rc1-1-gb86119f
Alex Vandiver
alexmv at bestpractical.com
Mon Sep 8 12:08:50 EDT 2014
The branch, 4.0/screenreader-menus has been created
at b86119f3bf8ae18ab0caf50828326487fa736d02 (commit)
- Log -----------------------------------------------------------------
commit b86119f3bf8ae18ab0caf50828326487fa736d02
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Sep 8 12:01:53 2014 -0400
Ensure that all menus have href=""s, for screen readers
Screenreaders navigate menus by tabbing between them -- however, the
lack of an href="" on the "Actions" and "Feeds" means that they are not
valid tab targets. As such, their sub-menus are not accessible.
Ensure that all menu items have an href, even if it is logically empty.
This ensures that screenreaders can reach it, and its sub-menus.
diff --git a/share/html/Elements/Menu b/share/html/Elements/Menu
index c1b1207..8135016 100644
--- a/share/html/Elements/Menu
+++ b/share/html/Elements/Menu
@@ -62,7 +62,7 @@
<% $child->raw_html |n %>
% } else {
% my $url = $m->interp->apply_escapes((not $child->path or $child->path =~ m{^\w+:/}) ? $child->path : RT->Config->Get('WebPath').$child->path, 'h');
-<a id="<%$item_id%>" class="menu-item <% $child->class || '' %>"<% $child->path ? ' href="'.$url.'"' : '' |n%><% $child->target ? ' target="'.$m->interp->apply_escapes($child->target, 'h').'"' : '' |n %>>\
+<a id="<%$item_id%>" class="menu-item <% $child->class || '' %>" href="<% $url || "#" |n%>"<% $child->target ? ' target="'.$m->interp->apply_escapes($child->target, 'h').'"' : '' |n %>>\
<% $child->escape_title ? $m->interp->apply_escapes($child->title, 'h') : $child->title |n %>\
</a>\
% }
-----------------------------------------------------------------------
More information about the rt-commit
mailing list