W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2012

[whatwg] Modal Dialog Focus

From: Scott González <scott.gonzalez@gmail.com>
Date: Mon, 22 Oct 2012 10:02:26 -0400
Message-ID: <CAO8i3id=WxBqYdHxjaxZS9cPRVv551757MGA1r3jiPEFXqFK2A@mail.gmail.com>
To: whatwg@lists.whatwg.org
The dialog.showModal() function defines steps for setting focus [1].
However, if the dialog does not contain any elements with the autofocus
attribute, then step 9 says to abort the steps and not set focus. It seems
problematic if the dialog is modal and does not have focus. How would a
keyboard user interact with the dialog? How would a screen reader know that
the dialog has been shown?

I would expect the control element to fall back to the first tab focusable
element if no element with autofocus exists. If there is still no control
element, I would expect the dialog itself to receive focus.

ARIA requires the element to contain at least one tab focusable element [2].

[2] http://www.w3.org/WAI/PF/aria-practices/#modal_dialog
Received on Monday, 22 October 2012 14:02:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:17 UTC