[Rt-commit] rt branch, 4.2/screenreader-menus, created. rt-4.2.6-174-g3ff27c6

Alex Vandiver alexmv at bestpractical.com
Mon Sep 8 12:22:21 EDT 2014


The branch, 4.2/screenreader-menus has been created
        at  3ff27c6948d2bba7ed0692d18edbd0cf8170ff3c (commit)

- Log -----------------------------------------------------------------
commit 3ff27c6948d2bba7ed0692d18edbd0cf8170ff3c
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/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index a2fa00f..a2154ea 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -1863,8 +1863,8 @@ sub RenderMenu {
 
             my $path = $child->path;
             my $url = (not $path or $path =~ m{^\w+:/}) ? $path : $web_path . $path;
-            $res .= ' href="'. $interp->apply_escapes($url, 'h') .'"'
-                if $url;
+            $url ||= "#";
+            $res .= ' href="'. $interp->apply_escapes($url, 'h') .'"';
 
             if ( $tmp = $child->target ) {
                 $res .= ' target="'. $interp->apply_escapes($tmp, 'h') .'"'

-----------------------------------------------------------------------


More information about the rt-commit mailing list