Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
2a887e4
Dialog: Improve accessibilty - add an aria-describedby attribute on t…
jzaefferer Oct 26, 2012
8ee8046
Dialog: Keep focus inside modal dialog, by handling focus events on e…
jzaefferer Oct 26, 2012
0a25b2c
Dialog: move to top when opening again, and focus as if opened from s…
jzaefferer Oct 26, 2012
2062a18
Dialog: Inline code review
jzaefferer Oct 27, 2012
4632780
Dialog: Fix yoda-if, remove unnecessary TODOs; add missing callbacks …
jzaefferer Nov 9, 2012
b6cefc7
Dialog: Remove deprecated disableSelection() usage.
jzaefferer Nov 9, 2012
4e03321
Dialog: Trigger focus event when dialog is moved to top.
jzaefferer Nov 9, 2012
324d54d
Dialog: Use $.isEmptyObject() to check if there a button-option prope…
jzaefferer Nov 9, 2012
f7d3a51
Dialog: Only add the new dialogClass, not the base classes when chang…
jzaefferer Nov 9, 2012
6edce86
Dialog: Remove attroperty workaround for title attribute. Make the de…
jzaefferer Nov 9, 2012
0848040
Dialog: Focus tabbable only when dialog lost focus before.
jzaefferer Nov 9, 2012
83a9f21
Dialog: Use button widget for close button (was already listed as dep…
jzaefferer Nov 15, 2012
fed2972
Dialog: Refactor _setOption to call _super early. Move dialogClass up…
jzaefferer Nov 15, 2012
7e964be
Dialog: Have _createButtons access the buttons option directly. Start…
jzaefferer Nov 15, 2012
16a79c1
Dialog: Finish refactoring _setOption, getting rid of unnecessary swi…
jzaefferer Nov 15, 2012
c8aef20
Dialog: Have _makeResizable look at options instead of passing handles.
jzaefferer Nov 15, 2012
1001504
Dialog: Remove outdated TODO
jzaefferer Nov 15, 2012
7a03535
Dialog: Refactor the mousedown-bind call to use _on, removing the nee…
jzaefferer Nov 15, 2012
f0acaac
Dialog: Refactor uiDialogTitlebar variable, use this.uiDialogTitlebar…
jzaefferer Nov 15, 2012
1d6ce64
Dialog: Refactor _create, extracting title bar creation in _createTit…
jzaefferer Nov 15, 2012
4c9caa8
Dialog: Extract button pane creation into _createButtonPane
jzaefferer Nov 15, 2012
625a111
Dialog: Extracting wrapper creation into _createWrapper. Merging the …
jzaefferer Nov 15, 2012
0ae6fc1
Dialog: Remove useless tmp vars.
jzaefferer Nov 15, 2012
972f5c1
Dialog: Button is now a fixed dependency, so remove the check
jzaefferer Nov 15, 2012
0bc73b7
Dialog: Remove busted ui-dialog-disabled class, shouldn't be there. R…
jzaefferer Nov 15, 2012
e3dcaf2
Dialog: Remove uuid and getTitleId. Leftovers from 240b22b1439df22408…
jzaefferer Nov 15, 2012
d8b98ec
Dialog: Tiny code improvements
jzaefferer Nov 16, 2012
9996173
Dialog: Pass through icons and showText (as 'text') options to button…
jzaefferer Nov 16, 2012
b694409
Dialog: Extend visual test to verify DOM position restore on destroy;…
jzaefferer Nov 16, 2012
299681e
Dialog: Cleanup in ticket tests: TODO to merge one test, fix whitespace
jzaefferer Nov 16, 2012
b27db7e
Dialog: Extend autofocus, starting with [autofocus], then :tabbable c…
jzaefferer Nov 16, 2012
0be97bf
Dialog: Removed broken disabled option from dialog, defuse disable/en…
jzaefferer Nov 17, 2012
a0310eb
Dialog: Move array notation support for position option to backCompat…
jzaefferer Nov 17, 2012
41c2afd
Dialog: Refactor overlay handling into two instance methods. Remove u…
jzaefferer Nov 17, 2012
32a8931
Dialog: Improve _destroy method, detaching dialog content from wrappe…
jzaefferer Nov 17, 2012
5aac8f5
Dialog: Add missing unit test for aria-describedby attribute
jzaefferer Nov 17, 2012
73533d9
Dialog: Exclude deprecated units from phantomjs
jzaefferer Nov 17, 2012
f3525af
Dialog: Update focus-tabbable test with a timer workaround to get IE8…
jzaefferer Nov 17, 2012
a09f5c0
Dialog: Follow-up to 9fe3a62d8 - also deprecate string notation for p…
jzaefferer Nov 21, 2012
ec1f1bd
Dialog: Follow-up to c77ca67 - exclude button options from properties…
jzaefferer Nov 22, 2012
d179cba
Dialog: Update position when size is changed. Fixes #8789 - Dialog do…
kborchers Nov 25, 2012
60486ac
Dialog: Don't focus dialog when mousedown is on close button. Fixes #…
jzaefferer Nov 26, 2012
7e9060c
Dialog: Extract setting the title into a _title method, use .text() t…
jzaefferer Nov 26, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Dialog: Extract setting the title into a _title method, use .text() t…
…o prevent XSS. Fixes #6016 - Dialog: Title XSS Vulnerability.
  • Loading branch information
jzaefferer committed Nov 26, 2012
commit 7e9060c109b928769a664dbcc2c17bd21231b6f3
13 changes: 9 additions & 4 deletions ui/jquery.ui.dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,21 @@ $.widget("ui.dialog", {
uiDialogTitle = $( "<span>" )
.uniqueId()
.addClass( "ui-dialog-title" )
.html( this.options.title || "&#160;" )
.prependTo( this.uiDialogTitlebar );
this._title( uiDialogTitle );

this.uiDialog.attr({
"aria-labelledby": uiDialogTitle.attr( "id" )
});
},

_title: function( title ) {
if ( !this.options.title ) {
title.html( "&#160;" );
}
title.text( this.options.title );
},

_createButtonPane: function() {
var uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
.addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
Expand Down Expand Up @@ -600,9 +607,7 @@ $.widget("ui.dialog", {
}

if ( key === "title" ) {
// convert whatever was passed in to a string, for html() to not throw up
$( ".ui-dialog-title", this.uiDialogTitlebar )
.html( "" + ( value || "&#160;" ) );
this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
}
},

Expand Down