aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-12-06 14:58:52 +0000
committerScott González <scott.gonzalez@gmail.com>2008-12-06 14:58:52 +0000
commit6e7e808d692423fe4faa0089a036e9a0c2c1800c (patch)
treeddb5c129101fb2b4971c1f581949e60c5be78fb0 /tests
parent03909cb87c8419e6718b3c0d59adbd1bd5afa1ba (diff)
downloadjquery-ui-6e7e808d692423fe4faa0089a036e9a0c2c1800c.tar.gz
jquery-ui-6e7e808d692423fe4faa0089a036e9a0c2c1800c.zip
Dialog: Fixed #3637: Added role of button to close link.
Diffstat (limited to 'tests')
-rw-r--r--tests/dialog.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/dialog.js b/tests/dialog.js
index c12266781..0c398105e 100644
--- a/tests/dialog.js
+++ b/tests/dialog.js
@@ -215,6 +215,24 @@ test("title id", function() {
el.remove();
});
+test("ARIA", function() {
+ expect(4);
+
+ el = $('<div></div>').dialog();
+
+ equals(dlg().attr('role'), 'dialog', 'dialog role');
+
+ var labelledBy = dlg().attr('aria-labelledby');
+ ok(labelledBy.length > 0, 'has aria-labelledby attribute');
+ equals(dlg().find('.ui-dialog-title').attr('id'), labelledBy,
+ 'proper aria-labelledby attribute');
+
+ equals(dlg().find('.ui-dialog-titlebar-close').attr('role'), 'button',
+ 'close link role');
+
+ el.remove();
+});
+
module("dialog: Options");
test("autoOpen", function() {