WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: a11y form use case question

for

From: Schalk Neethling
Date: Oct 22, 2013 8:15AM


Thanks for the feedback Jared. So these fields will be shown when a
checkbox is checked. So, I will move focus to the new field as well as
potentially marking the fieldset that contain these fields as an aria
live region.

On 22/10/2013 15:59, Jared Smith wrote:
> Schalk Neethling wrote:
>
>> Do I simply set these to display:none or should I rather hide them only
>> visually?
>
> Yes, use display:none for content that you do not want to be viewed,
> navigable, or read by a screen reader.
>
> The other concern might be when/how you make the additional form
> content visible (e.g., remove display:none). If the new form fields
> are revealed with an onblur event from the previous form control, it's
> possible that the keyboard focus will have moved beyond the newly
> revealed form content. This can cause confusion and can cause the new
> form fields to be missed by a screen reader user. Be sure to test, and
> if necessary, you can use javascript focus to set focus to the
> appropriate field.
>
> Jared
> > > >

--
Kind Regards
Schalk Neethling
Lead Front-End Engineer
Mozilla