Opened 11 years ago

Closed 11 years ago

#7882 closed defect (fixed)

Dialog focus mechanism not reliable

Reported by: vvagell Owned by: bill
Priority: high Milestone: 1.3
Component: Dijit Version: 1.1.1
Keywords: dialog a11y focus Cc:
Blocked By: Blocking:

Description

Dialog.js currently attempts to set focus on the first focusable item when it is displayed by waiting 50 milliseconds for rendering. This works sometimes, but (depending on the platform, system, etc.) often results in focus on an item outside of the dialog.

Instead of this 50 millisecond wait, Dialog should connect to the onEnd event of its fadeIn animation. That ENSURES that all widget pieces are fully rendered before attempting to set focus, no matter how slow the platform is, or what unusual timing happens to occur.

For details about a workaround users can apply to their own code today (without modifying Dojo), and more details about how this might be fixed, please see this forum post:

http://dojotoolkit.org/forum/dijit-dijit-0-9/dijit-support/why-doesnt-dialog-set-proper-focus#comment-19127

This defect affects accessibility, because blind users may not realize a Dialog has appeared if focus does not automatically get set within it.

Change History (2)

comment:1 Changed 11 years ago by bill

Milestone: tbd1.3
Owner: set to bill
Status: newassigned

OK, I'll check in this change, although I don't understand why the fade-in time is relevant. Why can't you focus on a half-faded-in widget? Presumably the widget is fully initialized.

comment:2 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

Fixed in [15641].

Note: See TracTickets for help on using tickets.