Modal jQuery Dialog
Noah Botimer
botimer at umich.edu
Mon Sep 15 18:16:08 UTC 2008
Hi folks,
This is good timing. I started using jq dialog last night and
spotted a couple of things. I had reasonable success hitting tab
once to get to my first input field, but would rather it picked up
the lowest tab index in the dialog. This may be in the patch -- I
haven't tested.
There are two other things, each of which cause me substantially more
grief...
1. The stuff is always added to document.body. This doesn't let you
jump out from a same-origin iframe. I'm tempted to hack in a target
container option, but this does require careful scrubbing of all
selectors to point at the right container. It also requires the
ability to do all styling inline/scripted in case a parent frame
doesn't have the desired CSS loaded.
2. The sizing seems somewhat broken in two ways. One, the content
gets the same size as the entire dialog and gets offset, making
centering, etc. difficult. Two, autosize doesn't pick up the content
and size the dialog to it. I hacked around this, probably most
inelegantly, but enough to get me by:
open: function() {
//jQuery UI Dialog sizes the content to the size of the full dialog...
//We want to make the content very close to the visual size it
"should be"...
var h = $(this).height();
var w = $(this).width();
var oh = $(this).outerHeight();
var ow = $(this).outerWidth();
var dialog = $(this).parents('.ui-dialog');
var bbh = dialog.find('.ui-dialog-buttonpane').outerHeight();
$(this).height(h - (oh - h) - bbh);
$(this).width(w - (ow - w));
}
One detail that seems questionable to me is that the title bar and
content are wrapped up in the ui-dialog-container, while the ui-
dialog-buttonpane is out with the invisible resizing divs and so on.
And one last small quirk is that you don't seem to be able to
suppress three features of the title bar: existence, grabbability,
and inclusion of the close X.
Some of these are probably best filed with the Dialog folks directly,
but I'll stand back and wait for a pointer if you think that's the case.
Thanks,
-Noah
On Sep 15, 2008, at 11:42 AM, Michelle D'Souza wrote:
> The ARIA support required for Dialog is very minimal (role=dialog),
> however, David and I were hoping to use the dialog as a starting point
> for more generalized ARIA support in jQuery UI. We will likely get
> started on this late this week or early next week.
>
> Michelle
>
> On 15-Sep-08, at 11:33 AM, Colin Clark wrote:
>
>> Hey Michelle,
>>
>> On 15-Sep-08, at 11:07 AM, Michelle D'Souza wrote:
>>> Scott Gonzalez has fixed the issue with jQuery UI's modal dialog
>>> not getting focus. http://ui.jquery.com/bugs/ticket/3327
>>> This means that if you use the trunk version of dialog for the
>>> Uploader you should have full keyboard support now. There is still
>>> an issue when there are multiple modal dialogs open but this
>>> shouldn't effect the Uploader. http://ui.jquery.com/bugs/ticket/3350
>>
>>
>> This is great news! Are you planning to work Scott to add ARIA
>> support to Dialog as well?
>>
>> Colin
>>
>> ---
>> Colin Clark
>> Technical Lead, Fluid Project
>> Adaptive Technology Resource Centre, University of Toronto
>> http://fluidproject.org
>>
>
> ------------------------------------------------------
> Michelle D'Souza
> Software Developer, Fluid Project
> Adaptive Technology Resource Centre
> University of Toronto
>
>
>
> _______________________________________________
> fluid-work mailing list
> fluid-work at fluidproject.org
> http://fluidproject.org/mailman/listinfo/fluid-work
>
>