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

feat(alert): add WAI-ARIA markup #1806

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/alert/test/alert.spec.js
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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>