E-mail List Archives
Thread: WCAG – Form fields and focus reset after JavaScript jump menu
Number of posts in this thread: 3 (In chronological order)
From: Maupin, Brennan Polaris McCaffrey - maupinbp
Date: Tue, Mar 05 2019 7:43AM
Subject: WCAG – Form fields and focus reset after JavaScript jump menu
No previous message | Next message →
Hi all,
Hi all, I have a quick question about a website that I am looking over and wanted to see if someone could point me in the right direction.
This website uses a number of drop-down forms to reserve a room and two of them have JavaScript functions attached to dynamically control the drop-down options further down on the page (very much like WCAG SCR19-Using an onchange event on a select element without causing a change of context<https://www.w3.org/WAI/WCAG21/Techniques/client-side-script/SCR19>).
My issue with these JS functions is that sometimes when they are triggered (like if I go back and correct an earlier form,) when I press tab again, they seem to "reset" the focus back to the topmost form field.
I can see how if it *automatically* changed focus it would definitely be violating 3.2.2, but I am not sure since there is no actual shift of focus until I press tab myself. Does anyone know if this compliant with WCAG or not?
Thanks so much,
Brennan
From: Laura Fathauer
Date: Tue, Mar 05 2019 8:04AM
Subject: Re: WCAG – Form fields and focus reset after JavaScript jump menu
← Previous message | Next message →
It sounds like its losing focus when you change the element value, which I
indicate is a problem with Focus Order. Logically, after you change that
value you'd want to go to the next element, not the top of the form.
Laura
On Tue, Mar 5, 2019 at 9:44 AM Maupin, Brennan Polaris McCaffrey - maupinbp
< = EMAIL ADDRESS REMOVED = > wrote:
> Hi all,
>
> Hi all, I have a quick question about a website that I am looking over and
> wanted to see if someone could point me in the right direction.
>
> This website uses a number of drop-down forms to reserve a room and two of
> them have JavaScript functions attached to dynamically control the
> drop-down options further down on the page (very much like WCAG SCR19-Using
> an onchange event on a select element without causing a change of context<
> https://www.w3.org/WAI/WCAG21/Techniques/client-side-script/SCR19>).
>
> My issue with these JS functions is that sometimes when they are triggered
> (like if I go back and correct an earlier form,) when I press tab again,
> they seem to "reset" the focus back to the topmost form field.
>
> I can see how if it *automatically* changed focus it would definitely be
> violating 3.2.2, but I am not sure since there is no actual shift of focus
> until I press tab myself. Does anyone know if this compliant with WCAG or
> not?
>
> Thanks so much,
> Brennan
>
> > > > >
From: Maupin, Brennan Polaris McCaffrey - maupinbp
Date: Wed, Mar 06 2019 8:39AM
Subject: Re: WCAG – Form fields and focus reset after JavaScript jump menu
← Previous message | No next message
That makes perfect sense to me! Thank you for your input Laura.
-Brennan