WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Sending focus in a radio button group on error - visible focus indicator.

for

From: Birkir R. Gunnarsson
Date: Mar 19, 2022 4:28PM


Hi

No, it's not a 2.4.7 fail, because the element the focus is moved to
is not operable (you can't click the legend to do anything).
Same as with skip links. Focus is typically placed on the container
for the main content of the page, not on the first focusable element
inside that container.

Personally I'd connect the error message to the radio button group
element using aria-describedby and place focus on the first radio
button in the group, but that's just a preference (aria-describedby on
grouping elements has pretty good support across browsers/screen
readers).


On 3/19/22, Laurence Lewis < <EMAIL REMOVED> > wrote:
> A decision was made in our Workplace in regard to error management for a
> radio button group. If the group has an error, focus is moved to the
> <legend> and the error message is located inside the legend element
> Example: Radio button group - error message location
> <https://codepen.io/Deafinitive/pen/RwjRReZ/30b2263b00edadb55840bfee19d76f9b>
> .
>
>
> When focus is moved to the legend element, is a visible focus indicator
> needed, and why? If there is no visible focus indicator is this a failure
> for 2.4.7 Focus Visible Level AA?
>
>
> Regards
>
> Laurence Lewis
> > > > >


--
Work hard. Have fun. Make history.