Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Dialog: Add aria-modal support #2257
Dialog: Add aria-modal support #2257
Changes from 8 commits
a8a6e26
729c6d0
268dc62
7f88e7f
22ea1a7
546144d
2506b1c
4810065
8283b78
42edf77
174bb27
e42ab78
3da0e24
67490a0
2b40401
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's
option
, notoptions
, but you can see in checks on this PR you're getting test failures like:The widget needs to be initialized first. It'd help if you read https://learn.jquery.com/jquery-ui/how-jquery-ui-works/ which explains these basics.
Here, you should just create the widget passing proper options to it as described in the "Initialization" section of that doc.
That also made me realize we also need to modify the
_setOption
method of the dialog. Find it in the file, you'll need to add:in there. Unfortunately, it seems the one in
_createWrapper
is needed as well.Then, we need tests for both the setting the option initially and then modifying it later to cover all grounds.
To summarize, I'd create three sections in this test - one with
modal
set totrue
:.dialog( { modal: true } )
; one when it's set tofalse
, and one when no options are passed:.dialog()
(you still need to initialize like that before calling.dialog( "option", "modal", true )
!)And then, within each of those sections, first do a proper assertion and then call
.dialog( "options", "modal", VALUE )
substitutingVALUE
for these three options and check again if the value is as expected. That should give you total 12 assertions in this test.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot for the detailed explanation, that helped figuring things out, even though it was way out of my comfort zone. but with the help of @rocketeerbkw i was able to finish the draft thursday night.