Skip to content

Commit fd0fb99

Browse files
wesleychojasonaden
authored andcommitted
feat(rating): add aria-valuetext attribute
- Add `aria-valuetext` attribute on each star element for accessibility Closes angular-ui#4349 Resolves angular-ui#4347
1 parent eae0326 commit fd0fb99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/rating/rating.html

Lines changed: 1 addition & 1 deletion
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)