jquery/jquery-ui — pull request #794 by jzaefferer (2012-10-26 00:55:05+00:00)
Title: Dialog: Improve accessibilty

add an aria-describedby attribute on the dialog if there is nothing yet in the dialog content.

@ezufelt could you give this a try? I've put together a test page for modal form dialog's with better markup then those in our demos:

http://view.jqueryui.com/dialog/tests/visual/dialog/form.html

That page has some info on what it provides and what we expect to happen based on the current implementation. Looking for input both on our assumptions as well as the implementation.

This change and a few already landed in master overlap with changes from this earlier pull request: https://github.com/jquery/jquery-ui/pull/704/files
Restoring focus to the trigger is implemented, setting the aria-describedby attribute is being added here, though only under the condition that there's no markup including an aria-describedby attribute yet.

I hope we can get away without the extra role="document" wrapper element. Base on my testing with current Firefox, NVDA and JAWS 12, it seems to work fine without it.