W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > October to December 2019

Re: Focus Visible (Enhanced)

From: Alastair Campbell <acampbell@nomensa.com>
Date: Tue, 10 Dec 2019 15:13:57 +0000
To: "Newton, Brooks (TR Product)" <Brooks.Newton@thomsonreuters.com>
CC: WCAG list <w3c-wai-gl@w3.org>
Message-ID: <57534627-B324-4318-AF74-11BDC2CA266A@nomensa.com>
Hi Brooks,

> Is a flat button, such as the one you included in Figure 1A in the Understanding document for SC 1.4.11 Non-text contrast<https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#user-interface-components>, an example of an “artificially expanded hit area” – as you’ve described?

Not really, it doesn’t have a visible hit area (until the focus indicator appears). In that case then defaulting to the actual size of the element would make sense.

By artificial I meant the case of having a visible background that you might assume is the hit-area, and then expanding it invisibly.

Do you think it would help to add a line to the understanding doc to that effect?

I scanned for a suitable point, and noticed that In the section “Size of the indicator”, it already says:
“To determine the minimum size for conformance purposes you would need to measure the size of the element.”

I think defaulting to the size of the element is the best approach in general, I’d rather not complicate it with what (I think) is an unusual example, is the artificially expanded hit-area something you’ve come across?

Assuming you say yes, there are a couple of ways of achieving that effect in HTML/CSS/JS:


  1.  The interactive component (e.g. <a href=””>) is the expanded area, and there is an inner <span> that defines the visible background.

  2.  The interactive component is the inner area with visible background, and the expanded hit area is applied with scripting.

I’d be inclined to use the interactive component (the <a> in HTML) as the basis, that aligns with where the focus indicator will be shown by default.
Therefore (1) needs a bigger indicator than (2). That might seem odd, but it allows people to use larger hit-areas without necessarily needing to expand the focus indicator.

A case that keeps cropping up for me is a large ‘card’ (e.g. box with heading, image, paragraph of text, ‘read more’ text), I’ve been seeing more people wrap the whole thing in a link to make it a large hit area, which is not a good experience for screenreaders (particularly voiceover/iOS).

I’ve been recommend they make the heading the link (which is the best text-link), and using a script to make the whole card clickable (including the now ‘fake’ read-more text at the bottom).

When tabbing through, the heading link needs a good focus indicator, and that aligns nicely the text-link approach. It is a better all-around experience than the whole card being the link, so long as the whole thing is click/tap-able.

Kind regards,

-Alastair
Received on Tuesday, 10 December 2019 15:14:02 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 21:08:32 UTC