WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Modal focus management and use of color for links

for

Number of posts in this thread: 2 (In chronological order)

From: megha patangi
Date: Mon, May 20 2024 3:16AM
Subject: Modal focus management and use of color for links
No previous message | Next message →

Hello Web Aim team,

I have two queries as follows:
1. There is a modal which has its first focusable element as close button
to top right of modal, and then there is a form with multiple fields in
this modal. No paragraph or alert is contained.
Thus, on launch of modal is it mandatory to bring focus on close button, or
it is even acceptable if we bring focus to first form field instead?

2. If there is alink which is either looking like as link because of its
color or does not look like link at all because its colour and style is
similar to other adjacent text.
Now, when we hover on these links, there appears an underline, stating that
this is link. On keyboard TAB focus, we do not get similar underline, but
definitely link receives explicit visible focus indicator with appropriate
contrast.
Thus, will this pass, or underline should appear on focus as well, just as
it appeared on hover, along with focus indicator?

Regards,
Megha

From: Patrick H. Lauke
Date: Mon, May 20 2024 3:21AM
Subject: Re: Modal focus management and use of color for links
← Previous message | No next message

1. WCAG doesn't mandate specifically where the focus lands. Just as long
as it's in a logical place to satisfy 2.4.3 Focus Order.

2. If the links are only differentiated by color (no other visible
characteristics), then they need to have a contrast of at least 3:1
against static text. Otherwise, it'll fail 1.4.1 Use of Color. Whether
or not you then show extra visual hints on hover and/or focus is irrelevant.

P
--
Patrick H. Lauke

* https://www.splintered.co.uk/
* https://github.com/patrickhlauke
* https://flickr.com/photos/redux/
* https://mastodon.social/@patrick_h_lauke