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

Commit 9a2638b

Browse files
bekospkozlowski-opensource
authored andcommittedFeb 15, 2014
feat(alert): add WAI-ARIA markup
Closes #1806
1 parent bce2505 commit 9a2638b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
 

‎src/alert/test/alert.spec.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
describe('alert', function () {
2-
32
var scope, $compile;
43
var element;
54

@@ -36,7 +35,7 @@ describe('alert', function () {
3635
}
3736

3837
function findContent(index) {
39-
return element.find('span').eq(index);
38+
return element.find('div[ng-transclude] span').eq(index);
4039
}
4140

4241
it('should generate alerts using ng-repeat', function () {

‎template/alert/alert.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<div class="alert" ng-class="{'alert-{{type || 'warning'}}': true, 'alert-dismissable': closeable}">
2-
<button ng-show="closeable" type="button" class="close" ng-click="close()">&times;</button>
1+
<div class="alert" ng-class="{'alert-{{type || 'warning'}}': true, 'alert-dismissable': closeable}" role="alert">
2+
<button ng-show="closeable" type="button" class="close" ng-click="close()">
3+
<span aria-hidden="true">&times;</span>
4+
<span class="sr-only">Close</span>
5+
</button>
36
<div ng-transclude></div>
47
</div>

0 commit comments

Comments
 (0)