Skip to content

Commit

Permalink
changes close element to button with proper accessibility rules (like…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Jenkins authored and faceleg committed Feb 6, 2017
1 parent acd67cc commit 5213b34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion css/ngDialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
animation: ngdialog-fadeout 0.5s;
}

.ngdialog-close {
-webkit-appearance: none;
background: none;
border: none;
}

.ngdialog-close:before {
font-family: 'Helvetica', Arial, sans-serif;
content: '\00D7';
Expand All @@ -111,4 +117,4 @@
html.ngdialog-open,
body.ngdialog-open {
overflow: hidden;
}
}
2 changes: 1 addition & 1 deletion js/ngDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@
locals = setup.locals;

if (options.showClose) {
template += '<div class="ngdialog-close"></div>';
template += '<button aria-label="Dismiss" class="ngdialog-close"></button>';
}

var hasOverlayClass = options.overlay ? '' : ' ngdialog-no-overlay';
Expand Down

0 comments on commit 5213b34

Please sign in to comment.