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

Commit

Permalink
feat(alert): add WAI-ARIA markup
Browse files Browse the repository at this point in the history
Closes #1806
  • Loading branch information
bekos authored and pkozlowski-opensource committed Feb 15, 2014
1 parent bce2505 commit 9a2638b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/alert/test/alert.spec.js
@@ -1,5 +1,4 @@
describe('alert', function () {

var scope, $compile;
var element;

Expand Down Expand Up @@ -36,7 +35,7 @@ describe('alert', function () {
}

function findContent(index) {
return element.find('span').eq(index);
return element.find('div[ng-transclude] span').eq(index);
}

it('should generate alerts using ng-repeat', function () {
Expand Down
7 changes: 5 additions & 2 deletions template/alert/alert.html
@@ -1,4 +1,7 @@
<div class="alert" ng-class="{'alert-{{type || 'warning'}}': true, 'alert-dismissable': closeable}">
<button ng-show="closeable" type="button" class="close" ng-click="close()">&times;</button>
<div class="alert" ng-class="{'alert-{{type || 'warning'}}': true, 'alert-dismissable': closeable}" role="alert">
<button ng-show="closeable" type="button" class="close" ng-click="close()">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
<div ng-transclude></div>
</div>

0 comments on commit 9a2638b

Please sign in to comment.