Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 72de2d8

Browse files
committed
feat(rating): add aria-valuetext attribute
- Add `aria-valuetext` attribute on each star element for accessibility Closes #4349 Resolves #4347
1 parent af2d1ef commit 72de2d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/rating/rating.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">
22
<span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? '*' : ' ' }})</span>
3-
<i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || 'glyphicon-star') || (r.stateOff || 'glyphicon-star-empty')" ng-attr-title="{{r.title}}" ></i>
3+
<i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || 'glyphicon-star') || (r.stateOff || 'glyphicon-star-empty')" ng-attr-title="{{r.title}}" aria-valuetext="{{r.title}}"></i>
44
</span>

0 commit comments

Comments
 (0)