WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Placing focus on form element

for

From: Lovely, Brian (CONT)
Date: May 9, 2017 1:26PM


Thanks Jared! There are a number of issues with the current markup. There's no role of dialog either. I'd like to see them refactor it like this:

Container with role of dialog

Close button

Form with role of search.

...and place focus on the close button when the modal opens.

-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Jared Smith
Sent: Tuesday, May 09, 2017 3:10 PM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Placing focus on form element

> When the modal opens, focus is placed on the modal container, which in this case is the actual form element.
> I can't find any clarification as to this being correct or not.

The *draft* ARIA practices document provides documentation on this - http://w3c.github.io/aria-practices/#dialog_modal

They recommend focusing the first interactive control within the dialog, or if the first interactive control is preceded by important text that can't be associated to that control, that focus be set to the first reasonable block of text in the dialog (such as the dialog title text, first paragraph, etc. with tabindex="-1"). I'm not really sure why in this case they don't recommend setting focus to the dialog element itself - this seems most logical to me.

Jared
The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.