-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Dialog: Add aria-modal support #2257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
a8a6e26
729c6d0
268dc62
7f88e7f
22ea1a7
546144d
2506b1c
4810065
8283b78
42edf77
174bb27
e42ab78
3da0e24
67490a0
2b40401
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,11 +70,12 @@ QUnit.test( "title id", function( assert ) { | |
} ); | ||
|
||
QUnit.test( "ARIA", function( assert ) { | ||
assert.expect( 4 ); | ||
assert.expect( 5 ); | ||
|
||
var element = $( "<div>" ).dialog(), | ||
wrapper = element.dialog( "widget" ); | ||
assert.equal( wrapper.attr( "role" ), "dialog", "dialog role" ); | ||
assert.equal( wrapper.attr( "aria-modal" ), "true", "aria-modal attribute" ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discussed with @rpkoller, this is a possible change to the tests given the suggested changes in https://github.com/jquery/jquery-ui/pull/2257/files#r1619122875. if (element.dialog( "option", "modal" )) {
assert.equal( wrapper.attr( "aria-modal" ), "true", "aria-modal attribute" );
} else {
assert.ok( !element.attr( "aria-modal" ), "aria-modal not set" );
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This test is failing right now because the dialog was created without the I'd recommend creating a separate test just after this one titled This |
||
assert.equal( wrapper.attr( "aria-labelledby" ), wrapper.find( ".ui-dialog-title" ).attr( "id" ) ); | ||
assert.equal( wrapper.attr( "aria-describedby" ), element.attr( "id" ), "aria-describedby added" ); | ||
element.remove(); | ||
|
Uh oh!
There was an error while loading. Please reload this page.