Skip to content

Commit d340169

Browse files
sg00dwinf0x11
authored andcommitted
Add alt text for left nav in mini-mode
Fixes openshift#2294 Replaces openshift#2309
1 parent 576fa1b commit d340169

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

app/views/_sidebar.html

+9-20
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,20 @@
2323
ng-mouseenter="onMouseEnter(primaryItem)"
2424
ng-mouseleave="onMouseLeave(primaryItem)"
2525
class="list-group-item">
26-
<a ng-if="primaryItem.href" ng-href="{{navURL(primaryItem.href)}}" ng-click="itemClicked(primaryItem)">
27-
<span class="{{primaryItem.iconClass}}"></span> <span class="list-group-item-value">{{primaryItem.label}}</span>
26+
<a
27+
ng-if="primaryItem.href"
28+
ng-href="{{navURL(primaryItem.href)}}"
29+
ng-click="itemClicked(primaryItem)">
30+
<span title="{{primaryItem.label}}" class="{{primaryItem.iconClass}}" aria-hidden="true"></span> <span class="list-group-item-value">{{primaryItem.label}}</span> <span ng-if="nav.collapsed && !isMobile" class="sr-only">{{primaryItem.label}}</span>
2831
</a>
2932
<a
3033
ng-if="!primaryItem.href"
3134
href=""
3235
ng-click="itemClicked(primaryItem)">
33-
<span class="{{primaryItem.iconClass}}"></span> <span class="list-group-item-value">{{primaryItem.label}}</span>
34-
class="hover-nav dropdown-menu hidden-xs">
35-
<ul class="nav nav-sidenav-secondary">
36-
<li
37-
ng-repeat-start="secondarySection in primaryItem.secondaryNavSections"
38-
ng-if="secondarySection.header"
39-
class="dropdown-header">
40-
{{secondarySection.header}}
41-
</li>
42-
<li
43-
ng-repeat="secondaryItem in secondarySection.items"
44-
ng-class="{ active: secondaryItem === activeSecondary }"
45-
ng-if="show(secondaryItem)">
46-
<a ng-href="{{navURL(secondaryItem.href)}}">{{secondaryItem.label|translate}}</a>
47-
</li>
48-
<li ng-repeat-end style="display:none;"></li>
49-
</ul>
50-
</div>
36+
<span title="{{primaryItem.label}}" class="{{primaryItem.iconClass}}" aria-hidden="true"></span> <span class="list-group-item-value">{{primaryItem.label}}</span> <span ng-if="nav.collapsed && !isMobile" class="sr-only">{{primaryItem.label}}</span>
37+
</a>
38+
39+
<!-- Secondary Nav -->
5140
<div
5241
ng-if="primaryItem.secondaryNavSections.length"
5342
class="hover-nav visible-xs-block">

dist/scripts/templates.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,10 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
513513
" 'secondary-nav-item-pf': primaryItem.secondaryNavSections.length\n" +
514514
" }\" ng-if=\"show(primaryItem)\" ng-mouseenter=\"onMouseEnter(primaryItem)\" ng-mouseleave=\"onMouseLeave(primaryItem)\" class=\"list-group-item\">\n" +
515515
"<a ng-if=\"primaryItem.href\" ng-href=\"{{navURL(primaryItem.href)}}\" ng-click=\"itemClicked(primaryItem)\">\n" +
516-
"<span class=\"{{primaryItem.iconClass}}\"></span> <span class=\"list-group-item-value\">{{primaryItem.label}}</span>\n" +
516+
"<span title=\"{{primaryItem.label}}\" class=\"{{primaryItem.iconClass}}\" aria-hidden=\"true\"></span> <span class=\"list-group-item-value\">{{primaryItem.label}}</span> <span ng-if=\"nav.collapsed && !isMobile\" class=\"sr-only\">{{primaryItem.label}}</span>\n" +
517517
"</a>\n" +
518518
"<a ng-if=\"!primaryItem.href\" href=\"\" ng-click=\"itemClicked(primaryItem)\">\n" +
519-
"<span class=\"{{primaryItem.iconClass}}\"></span> <span class=\"list-group-item-value\">{{primaryItem.label}}</span>\n" +
519+
"<span title=\"{{primaryItem.label}}\" class=\"{{primaryItem.iconClass}}\" aria-hidden=\"true\"></span> <span class=\"list-group-item-value\">{{primaryItem.label}}</span> <span ng-if=\"nav.collapsed && !isMobile\" class=\"sr-only\">{{primaryItem.label}}</span>\n" +
520520
"</a>\n" +
521521
"\n" +
522522
"<div ng-if=\"primaryItem.secondaryNavSections.length\" class=\"secondary-nav-item-pf\" ng-class=\"{\n" +

0 commit comments

Comments
 (0)