Difference between revisions of "ARIA Alert Dialog"
Jump to navigation
Jump to search
ARIA AlertDialog Example
Line 1: | Line 1: | ||
− | |||
<html lang="en"> | <html lang="en"> | ||
<head> | <head> | ||
Line 83: | Line 82: | ||
// This is the default behavior of a modal dialog | // This is the default behavior of a modal dialog | ||
document.addEventListener("keydown", function(event) { | document.addEventListener("keydown", function(event) { | ||
− | if (document.getElementById('alert-dialog').display != 'none' && event.keyCode == 27) { | + | if (document.getElementById('alert-dialog').display != 'none' && event.keyCode == 27) { |
document.getElementById('alert-dialog').style.display = 'none'; | document.getElementById('alert-dialog').style.display = 'none'; | ||
document.getElementById('modal-overlay').style.display = 'none'; | document.getElementById('modal-overlay').style.display = 'none'; | ||
Line 130: | Line 129: | ||
</body> | </body> | ||
</html> | </html> | ||
− | |||
[[Category:ARIA]] | [[Category:ARIA]] |
Revision as of 19:00, 20 June 2014
This code works but doesn't work in the wiki because wiki markdown doesn't like double ampersands. If you copy this code into a local HTML file it will work fine.