Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.4.7 Focus Visible - what counts as "visible"? #302

Closed
patrickhlauke opened this issue Sep 4, 2017 · 30 comments
Closed

2.4.7 Focus Visible - what counts as "visible"? #302

patrickhlauke opened this issue Sep 4, 2017 · 30 comments
Labels

Comments

@patrickhlauke
Copy link
Member

Arguably, "visible" is not unambiguously defined/testable. A strict reading of just the word of WCAG would indicate that any focus indication is "visible", even if it has far too low contrast, is too thin, is difficult to distinguish somehow.

It would be useful if "visible" could be at least defined a bit more in non-normative understanding documentation - or ideally, if the normative definition of the SC could include clearly testable statements of what does and does not constitute "visible".

@karlgroves
Copy link

I agree with @patrickhlauke

In the Abstract and Background, WCAG states the importance that SCs be testable:

WCAG 2.1 success criteria are written as testable statements that are not technology-specific.

In terms of "Focus Visible", it would go a long way for understanding conformance if a definition of "visible" was provided. In practice we see many well-meaning developers providing a focus indication that is likely to be difficult or impossible to discern for the reasons Patrick mentioned.

@alastc
Copy link
Contributor

alastc commented Sep 4, 2017

The interactive components contrast SC is intended to cover focus indicators. Assuming you saw that, did it not appear to cover focus indicators, or would you still rather see visible better defined?

@patrickhlauke
Copy link
Member Author

The interactive components contrast SC is intended to cover focus indicators"

unless 2.4.7 then cross-references that SC (ideally normatively), it still leaves this SC's vague language in place. And as the SC will be looked at in isolation, it'll still be a problem.

@patrickhlauke
Copy link
Member Author

In short, even if this SC really means "visible" as a binary "there is or isn't a focus indication", it should (at the very least in the understanding doc) define clearly what "visible" means. Even if it simply needs to say that, in broad terms, ANY styling change/visual addition/etc counts as "visible".

@DavidMacDonald
Copy link
Contributor

DavidMacDonald commented Sep 4, 2017

Even if it simply needs to say that, in broad terms, ANY styling change/visual addition/etc counts as "visible".

2.4.7 passes if the author doesn't remove the focus indicator... theoretically it would fail if the author created an outline of no width and with no colour but I've never seen that. The only failure I see is removing focus indicators. We may want to merge 2.4.7 with the new SC. That's on the table.

The Interactive components SC should make it clear focus indicators are covered. I made a recommendation early on that has not been adopted. I think we'll have to cycle back and I agree we need a cross reference in the normative document. There is lots of precedence for that already in WCAG 2.1

@patrickhlauke
Copy link
Member Author

patrickhlauke commented Sep 4, 2017

Speaking theoretically, a very strict reading of the normative text would mean that, in an extreme case, if focus introduces a single pixel change on screen, right at the limit of what can be represented (e.g. on a white #ffffff background going from nothing to a single 1px dot with color #fffffe, the smallest step possible using hex away from pure white) this would "pass". Of course that would be absolutely useless to users, but an argument could certainly be made that this is "visible". So yes, somehow patching this would be good...

@aardrian
Copy link

aardrian commented Sep 4, 2017

I have opinions on this. I think the SC should consider default focus styles when identifying a pass/fail. I have said as much in other issues. I'll just leave this example here where the Chrome default focus ring is the same color as the page background: https://codepen.io/aardrian/pen/WxEbrg

@patrickhlauke
Copy link
Member Author

@aardrian problem there is that it's arguably a UA issue/responsibility/failing. the browser should, if the defaults are not messed with by author CSS, do its job properly...

@DavidMacDonald
Copy link
Contributor

@patrickhlauke Yes this is right... there is no requirement on "how" visible it needs to be under 2.4.7 in WCAG. There were long passionate discussions during WCAG 2 about this. But that is water under the bridge.

I'd like to explore merging with the new SC.

@StommePoes
Copy link

During a WCAG2.1 discussion get-together we had on the 10th of January, this issue came up-- that the clear exception for user-agent-authored in 1.4.11 ("except where the appearance of the component is determined by the user agent and not modified by the author") could fall back to hit 2.4.7 where it hadn't so explicitly before.
If we point to 2.4.7 or 1.4.11 when the user-agent focus is not good enough, while one could argue "okay the browser vendor needs to address that", our main purpose in alerting a client about the issue is because it affects their users and they have an (easy) method of remedying this (authored focus styles).
It seems instead to create a more explicit loophole for those who only want to follow the letter rather than the spirit/intent.

@alastc
Copy link
Contributor

alastc commented Jan 13, 2018

I don't think it is much of a loophole, if the appearance of the component is unchanged by the author, it would be default text links or default buttons. Do you come across that much?

I haven't, it is almost always that links & inputs have been styled, and the outlines have been removed (we fail on 2.4.7 a lot). So the recommendation is to replicate the mouseover styles or allow the default outline, which is what most people then do.

@patrickhlauke
Copy link
Member Author

going back to the "what is 'visible'" angle - is 2.4.7 going to be subtly extended to cross-reference 1.4.11 (either normatively or in the understanding doc)?

@alastc
Copy link
Contributor

alastc commented Jan 13, 2018

It would have to the understanding rather than SC text, but I can't see a problem with adding something there. E.g. at the bottom of the last paragraph in the 'intent' section, focus indicators should meet 1.4.11.

@StommePoes
Copy link

StommePoes commented Jan 14, 2018

I haven't, it is almost always that links & inputs have been styled, and the outlines have been removed (we fail on 2.4.7 a lot). So the recommendation is to replicate the mouseover styles or allow the default outline, which is what most people then do.

We (the designers at work) allow the default outline. Then we (the accessibility QA at work) fail the dev teams because it's often not very visible (depending on user agent, all the examples Pat mentioned earlier like blink's blue when the focusable is on a blue background area). That's because our internal QA goes by "can WE see the outline" rather than "can a computer measure an outline exists".
Also in our case replicating mouseover wouldn't be enough as the mouseovers are usually too subtle to see on a normal computer screen (of course it looks super obvious to designers on month-old cinema screens with retina-something).

In the discussion group we wanted that IF authors changed something in the general link/button/whatever style, that this should ideally mean they need to manually check or add in focus styles.

@patrickhlauke
Copy link
Member Author

@StommePoes i think the end result of the discussion here is that wcag 2.1 will keep this flawed / very vague SC, but cross-reference the tighter 1.4.11. so those too-subtle focus indicators will pass 2.4.7 BUT fail 1.4.11

@alastc
Copy link
Contributor

alastc commented Jan 15, 2018

I'm not sure I'm entirely following, but I suspect there is a gap in the changes of state, e.g. default to focused. I don't think there is anything that says those two aspects need contrast, which is in discussion here.

The question for me is does changing the background count as changing the default appearance of a link? (I.e. the background of a parent element, not adding a background to the link.) If so it's covered, if not then it is a bit of a gap but not sure we can fill it.

@fstorr
Copy link
Contributor

fstorr commented Apr 24, 2019

I'm hoping this is the correct issue for my question as it relates to what is "visible". I'm currently working on projects where main brand color is almost identical to the blue focus ring that Chrome uses for interactive elements. If we leave the focus ring untouched then, as I read the current success criteria, we would pass because we're using the browser's default styling, even though it's almost impossible to see the focus ring. This seems to be a problem of both Focus Visible and Non-text Contrast criteria.

@patrickhlauke
Copy link
Member Author

@fstorr it would pass 2.4.7 (as 2.4.7 really just says "visible" without defining any other parameters), but fail 1.4.11. if you left it untouched/unstyled, then it's up to the user agent to provide a clearly contrasting/visible focus indication. if you explicitly define it yourself, then it's your responsibility, and therefore your failure, if the contrast is too low.

@StommePoes
Copy link

It's as if we need another set of "standards" called Practica11y which is based on arguments such as "while doing x technically meets WCAG, the end result is obviously useless for real humans" with recommendations similar to the Techniques in WCAG. It would tackle things like "default browser focus is useless with these branding backgrounds", "box-shadow/background-color/border-color changes to show states is invisible in WHC", "z-indices of custom control images interfere with speech recognition" etc.

Problems are: Yet M0aR Standards/Drowning In Standards and No Authority (as much as WCAG doesn't have a lot of actual authority, it's an easy thing for organisations to use as a goal and act as though it's an authority of some sort). But it could be similar to how people decide whether to shoot for AA or AAA, I suppose. "We meet WCAG AA and the Practical Accessibility Techniques list" or something.

@patrickhlauke
Copy link
Member Author

It's as if we need another set of "standards" called Practica11y which is based on arguments such as "while doing x technically meets WCAG, the end result is obviously useless for real humans"

the problem is quite complex here. in part, it's due to not having been able to actually go in and fix old WCAG 2.0 SCs (to make those backwards compatible).

as for browser defaults, we'd then need to constantly keep it up to date based on what different defaults browsers use, what heuristics they use, etc. not a sustainable model.

browsers should really provide accessible defaults / follow UAAG. but hey...

for developers, what's really needed is for them to not try to just meet WCAG, but to see it as a lowest common denominator.

@mraccess77
Copy link

Seems like if you modify any part of the visual appearance of the control then you are responsible for the focus indicator and all parts meeting contrast right? Or do others read it that only if you change visual aspect related to focus indicator are you responsible for the focus indicator having sufficient contrast.

@patrickhlauke
Copy link
Member Author

@mraccess77 aye, there's the rub. a strict reading of "or where the appearance of the component is determined by the user agent and not modified by the author" would suggest that ANY styling (even unrelated to focus outline...like setting the text color or something similar) would break this. In essence, even changing the background for the whole page could count as modifying the appearance (if it's a link, and it's now not showing on the completely vanilla background colour of a page). or setting a base font on the html element that then affects the appearance of the control. dare i say this is...wooly? does it in effect mean "only in completely unstyled documents"? (i believe this was raised in discussions at the time, but can't remember an authoritative answer on that)

@patrickhlauke
Copy link
Member Author

@mraccess77 i'd suggest opening a new issue on this particular aspect. my energy for discussing these types of very fine points is currently depleted...

@alastc
Copy link
Contributor

alastc commented Apr 24, 2019

The concessus position was that we couldn't cover changing aspects with the 1.4.11 wording, so it covers that the component must maintain contrast, but not the change of contrast for focus.

No need for a new issue, it is one of the 2.2 SCs to work on, let me know if you want to get involved.

@mraccess77
Copy link

I believe what was agreed upon for the target SC which has similar language is that any visual change to component would trigger it -- but changes to the page background or ancestor elements that weren't inherited would not count and the exception could be used.

@fstorr
Copy link
Contributor

fstorr commented Apr 24, 2019

@fstorr it would pass 2.4.7 (as 2.4.7 really just says "visible" without defining any other parameters), but fail 1.4.11. if you left it untouched/unstyled, then it's up to the user agent to provide a clearly contrasting/visible focus indication. if you explicitly define it yourself, then it's your responsibility, and therefore your failure, if the contrast is too low.

Thanks for this. I read and re-read 1.4.11 before posting here. I got tripped up on this, which I took to mean the just focus styling and not the component as a whole in any state:

"except where the appearance of the component is determined by the user agent and not modified by the author."

@johnfoliot
Copy link

johnfoliot commented Apr 24, 2019 via email

@alastc
Copy link
Contributor

alastc commented Apr 24, 2019

Sorry, please forgive a short answer, I'm trying to work through the 185 issue backlog at the moment.

Let's solve the core problem of defining 'visible', which is best done with an addition :-)

@patrickhlauke
Copy link
Member Author

now this is making me wonder...is the " where the appearance of the component is determined by the user agent and not modified by the author" just referring to, say, the state indication i.e. the focus ("if the author has changed the appearance of the component to show the focus"), or the appearance in general, even when not focused (i.e. just a general "this is how links/buttons/etc look in general" type CSS)?

@awkawk awkawk added the WCAG 2.2 label May 9, 2019
@awkawk
Copy link
Member

awkawk commented May 9, 2019

As this issue is on the list of issues to work on for WCAG 2.2, I am closing this issue after adding the "WCAG 2.2" label. We will revisit the WCAG 2.2-labeled items after WCAG 2.2 is done and can reopen issues as needed.

@awkawk awkawk closed this as completed May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants