Dialog: Add option to set the html element for the dialog title
PR for https://github.com/jquery/jquery-ui/issues/2271. Initial draft adding an option based on the naming @mgol suggested on the issue (uiDialogTitleTagName ) and using span as the default. Currently working on adding tests as well in the next step.
Ok i've finished an initial draft. I am not sure if the multiline syntax and formatting i've used is correct but i had to satisfy the linter and get to a line length < 100 characters. and i've also added a test. i've created a modal dialog and set the desired tag name to h2. i've picked an html tag != the default value span. I then used the queryselector to pick the title element which has the class name of .ui-dialog-title and with the tagName property i've checked if that element is the given h2. and i thought it is unnecessary to check several different scenarios like for the aria-modal test. i thought a single one should be enough here i hope?
The good thing, the test works (the expected value is an h2 but the actual value is still a span). so my fix for the line length linting error isn't working (as a one liner it works locally).
Got the test to green with the help of @rocketeerbkw. the only thing we were not sure if it was necessary to add the new option to the common-deprecated.js file as well.
so you mean creating a pull request for api.jqueryui..com including the note about the initial release in 1.14.1? i can create that initial draft over there.
And do i need to create an issue in the api.jqueryui.com issue queue first or would it be ok to directly open a pull request there? cuz on the jqueryui repo ive also had to use the issue number of the issue for the branch. for this issue here the branch is called for example 2271-add-option-uidialogtitle-html-element.
Just a PR will be fine. We can have it reference the corresponding UI issue + PR in the commit message.
oki, and should i omit using an issue number in the branch name?
The branch name doesn’t matter, you can use whatever is convenient for you.
@fnagel can you review as well?
Thanks, merged! The change will arrive in jQuery UI 1.14.1.
Thank you! and one question do you already have a rough plan when you want to release 1.14.1? i ask if there is a slight chance it might be released before the first beta for the next minor release drupal (11.1) arrives , which is planned for november 11th?
@rpkoller yeah, a release in October is likely if nothing critical comes out and the milestone (https://github.com/jquery/jquery-ui/milestone/8) is clean; currently, there's one issue to fix there, but it's simple.
that would be perfect, thank you for the headsup!
@rpkoller jQuery UI 1.14.1 with this change has been released.