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

F78 example 2 is anachronistic #4249

Open
besenwagen opened this issue Feb 25, 2025 · 6 comments
Open

F78 example 2 is anachronistic #4249

besenwagen opened this issue Feb 25, 2025 · 6 comments

Comments

@besenwagen
Copy link

besenwagen commented Feb 25, 2025

[tl;dr note: by "describes a quaint default thin dotted user agent focus style" in the following I did not mean to refer to the code example itself, but to the phrase "looks the same as"]

Example 2 of F78 describes a quaint default thin dotted user agent focus style that does not exist anymore in mainstream browsers. All contemporary mainstream user agents on Windows and macOS have a solid medium-ish border with lots of idiosyncratic discrepancies. It would probably be best to remove that example altogether.

Just a few differences that would make an "in the spirit of"-update rather cumbersome to describe:

  • Firefox, Chrome and Edge generally have a white outer border for links
  • on macOS links have an inner border that will be blue for Chrome and Firefox if the system accent colour is multicolour, but black in Edge
  • on macOS if the system accent colour is a single colour, it will generally be used for link and button focus colours; except for Safari, where buttons are not affected
  • focus style of Buttons mostly resembles links, but not in Firefox, that uses a lighter version of the inner border with a noticeable offset
  • on Windows the inner border is black for Chrome and Edge and accent colour doesn't make a difference in any mentioned browser
  • and so on
@fstrr
Copy link
Contributor

fstrr commented Feb 25, 2025

That failure document, and the examples in it, relate to styles of focus indicators that authors can create rather than the default browser / user agent styles.

@besenwagen
Copy link
Author

besenwagen commented Feb 25, 2025

Related:

G165 Example 1:

The default focus indicator on Microsoft Windows is a one-pixel, black dotted line around the focused element.

@besenwagen
Copy link
Author

besenwagen commented Feb 25, 2025

That failure document, and the examples in it, relate to styles of focus indicators that authors can create rather than the default browser / user agent styles.

The code in example 2 does not create a focus indicator. It creates a permanent outline that is supposed to look identical to the focus indicator. If that is not supposed to be the default focus indicator, any style declaration could be used there, really. :)

Ah, I see. I possibly never understood the purpose of this failure technique because it used to resemble the old focus style of windows (browsers). Since the permanent outline style is inherited, it really depends on the user agent whether the focus is visible. In at least one of two browser in a very brief test, the offset is also changed with focus-visible (and 2.4.7 would pass there).

@fstrr
Copy link
Contributor

fstrr commented Feb 25, 2025

Ah yes, you're right about the permanent outline. As I'm just about to post this reply referencing your comment, I see you've struck through your comment on that :)

Also note that the failure document does mention it doesn't relate to user-agent styles:

This describes a failure condition that occurs when the user agent's default visual indication of keyboard focus is turned off or rendered non-visible by other styling on the page without providing an author-supplied visual focus indicator.

@besenwagen
Copy link
Author

Also note that the failure document does mention it doesn't relate to user-agent styles:

I understand that, but the wording is extremely misleading, at least as far as I am concerned. "... an outline around links that looks the same as the focus indicator" seems entirely superfluous, if the actual problem is any permanent outline that is inherited and no additional default focus(-visible) style is.

@besenwagen
Copy link
Author

besenwagen commented Feb 25, 2025

If I take example 3 instead, Firefox on macOS with default accent colour draws an additional blue outline around the author supplied medium black border with the same width that has a contrast ratio of 5.4:1. Not mentioning the thin white outline around that, that might or might not be 'visible' as well. Windows is likely to be similar or identical. A lot of footnotes might be in order. It really seems to me that all this is written around a G165 timeline of Windows that hopefully nobody who has a connection to the internet uses anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants