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

[css-selectors-4] browser focus styles and focus-visible, example 38 #4278

Closed
frivoal opened this issue Sep 5, 2019 · 12 comments · Fixed by #5974
Closed

[css-selectors-4] browser focus styles and focus-visible, example 38 #4278

frivoal opened this issue Sep 5, 2019 · 12 comments · Fixed by #5974
Labels
selectors-4 Current Work

Comments

@frivoal
Copy link
Collaborator

frivoal commented Sep 5, 2019

My understanding of :focus-visible was that it gave authors access to the existing logic by which browsers style focused elements, so that authors could change that, without adding focus indicators onto things where the browser wouldn't, which is what would happen if they used :focus instead.

However, the spec, and in particular example 38, suggest that authors could write something like:

:focus:not(:focus-visible) {
  outline: 0;
}

in order to suppress browser-supplied focus indicators on elements that match :focus but not :focus-visible.

That's very confusing to me, as by my understanding, there should be no such element. The sentence immediately before the example also seems to agree with me.

Maybe that selector is meant as a poor man's @support for selectors, but it's given what the rest of the example does, it's not needed or useful.

If I'm right, this example is causing confusion and inducing authors to think that they need to use :focus:not(:focus-visible) to select and suppress undesirable browser styles, which is just not true. In that case, this should be removed from the example.

If I'm wrong, I'd like to understand why, because then the feature no longer makes sense to me.

@frivoal frivoal added the selectors-4 Current Work label Sep 5, 2019
@mrego
Copy link
Member

mrego commented Dec 23, 2020

I think that while the default stylesheet on the UAs are using :focus and not :focus-visible, the way to go is to use this :focus:not(:focus-visible) and disable the focus ring in that case.

For example you have a <div tabindex="1">Click me!</div>, when you click it, it gets focused, so it's going to match :focus, but it's not going to match focus-visible.
Chromium is still using :focus in the UA stylesheet, so unless you do something like that, you won't be able to get rid of the focus ring in those cases. I haven't checked what Firefox does.

CC @alice @emilio @robdodson

@emilio
Copy link
Collaborator

emilio commented Dec 23, 2020

Which UA sheet is using :focus but not :focus-visible to show outlines? I'd consider that a bug.

@emilio
Copy link
Collaborator

emilio commented Dec 23, 2020

(AFAICT in Gecko all UA sheets use :-moz-focusring. when :focus-visible is enabled they are equivalent)

@mrego
Copy link
Member

mrego commented Dec 28, 2020

Chromium is using :focus in the UA sheet, probably it should switch to :focus-visible now that it has shipped.

WebKit uses :-webkit-direct-focus (it doesn't support :focus-visible yet).

@mrego
Copy link
Member

mrego commented Dec 28, 2020

I believe that the problem might be that Chromium has implemented something different than what the initial idea was, and that's why this confusion arise. Maybe I'm wrong but let's me explain my thoughts next.

The spec says:

The :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the user agent determines via heuristics that the focus should be made evident on the element.

So let's use again a very simple example:

<div tabindex="1">Click me!</div>

When you click on that element Chromium (and WebKit) shows an outline, however in Chromium it doesn't match :focus-visible. This seems to be a contradiction to the initial text on the spec.
In Firefox it doesn't show any outline, so :focus-visible doesn't match either, but that seems to be the expected behavior.

I guess Chromium is implementing this other part of the spec:

If the user interacts with the page via a pointing device, such that the focus is moved to a new element which does not support user input, the newly focused element should not match :focus-visible.

So if Chromium decides to change the UA sheet to use :focus-visible there'll be a change of behavior in those cases, when you click an element like the one in the example the outline would be gone after the change in the UA sheet.
Maybe that's what we want in order to look for interoperability in when the focus ring is shown or not.

It'd be nice to understand why Chromium did this and why the UA sheet is still not using :focus-visible.

@emilio
Copy link
Collaborator

emilio commented Dec 28, 2020

I think this is just a Chromium bug, tbf. Chromium should be using :focus-visible in the UA sheet.

mrego added a commit to mrego/wpt that referenced this issue Dec 28, 2020
This test checks that when you click an element to focus it,
it doesn't show any kind of focus ring. See issue w3c/csswg-drafts#4278.

Currently Firefox passes this test, by Chromium fails it
because Chromium is using `:focus` on the default UA stylesheet
and is adding an outline on the element, despite it doesn't match
:focus-visible (see https://crbug.com/1162070).
@mrego
Copy link
Member

mrego commented Dec 28, 2020

I think this is just a Chromium bug, tbf. Chromium should be using :focus-visible in the UA sheet.

I agree, I've just reported https://bugs.chromium.org/p/chromium/issues/detail?id=1162070

And also created a test that fails in Chromium due to this (and pass in Firefox) at web-platform-tests/wpt#27015

mrego added a commit to mrego/wpt that referenced this issue Dec 28, 2020
This test checks that when you click an element to focus it,
it doesn't show any kind of focus ring. See issue w3c/csswg-drafts#4278.

Currently Firefox passes this test, by Chromium fails it
because Chromium is using `:focus` on the default UA stylesheet
and is adding an outline on the element, despite it doesn't match
:focus-visible (see https://crbug.com/1162070).
mrego added a commit to mrego/wpt that referenced this issue Dec 28, 2020
This test checks that when you click an element to focus it,
it doesn't show any kind of focus ring. See issue w3c/csswg-drafts#4278.

Currently Firefox passes this test, by Chromium fails it
because Chromium is using `:focus` on the default UA stylesheet
and is adding an outline on the element, despite it doesn't match
:focus-visible (see https://crbug.com/1162070).
emilio added a commit to emilio/html that referenced this issue Dec 28, 2020
This matches Firefox, and the intent of this CSS pseudo-class, see
w3c/csswg-drafts#4278.
emilio added a commit to emilio/html that referenced this issue Dec 28, 2020
This matches Firefox, and the intent of this CSS pseudo-class, see
w3c/csswg-drafts#4278.
mrego added a commit to mrego/wpt that referenced this issue Jan 8, 2021
This test checks that when you click an element to focus it,
it doesn't show any kind of focus ring. See issue w3c/csswg-drafts#4278.

Currently Firefox passes this test, by Chromium fails it
because Chromium is using `:focus` on the default UA stylesheet
and is adding an outline on the element, despite it doesn't match
:focus-visible (see https://crbug.com/1162070).
mrego added a commit to mrego/wpt that referenced this issue Jan 8, 2021
This test checks that when you focus an element via script,
it show a focus ring with `outline-style: auto`.
See: w3c/csswg-drafts#4278 & whatwg/html#6256

Currently Chromium and WebKit pass this test,
because despite they don't use `:focus-visible` in the UA stylesheet,
they're painting an auto style outline when an element is focused.
However Firefox fails it, because even when it uses `:-moz-focusring`
(the equivalent to `:focus-visible`) in the UA stylesheet,
it uses dotted style for the outline.
mrego added a commit to mrego/wpt that referenced this issue Jan 8, 2021
This test checks that when you focus an element via script,
it show a focus ring with `outline-style: auto`.
See: w3c/csswg-drafts#4278 & whatwg/html#6256

Currently Chromium passes this test,
because despite they don't use `:focus-visible` in the UA stylesheet,
it's painting an auto style outline when an element is focused.
However Firefox fails it, because even when it uses `:-moz-focusring`
(the equivalent to `:focus-visible`) in the UA stylesheet,
it uses dotted style for the outline.
WebKit doesn't support `:focus-visible` yet an it fails,
thought it's painting an auto style outline
(the background color doesn't match on the test).
mrego added a commit to mrego/wpt that referenced this issue Jan 8, 2021
This test checks that when you focus an element via script,
it show a focus ring with `outline-style: auto`.
See: w3c/csswg-drafts#4278 & whatwg/html#6256

Currently Chromium passes this test,
because despite they don't use `:focus-visible` in the UA stylesheet,
it's painting an auto style outline when an element is focused.
However Firefox fails it, because even when it uses `:-moz-focusring`
(the equivalent to `:focus-visible`) in the UA stylesheet,
it uses dotted style for the outline.
WebKit doesn't support `:focus-visible` yet an it fails,
thought it's painting an auto style outline
(the background color doesn't match on the test).
mrego added a commit to mrego/wpt that referenced this issue Jan 12, 2021
This test checks that when you focus an element via script,
it show a focus ring with `outline-style: auto`.
See: w3c/csswg-drafts#4278 & whatwg/html#6256

Currently Chromium passes this test,
because despite they don't use `:focus-visible` in the UA stylesheet,
it's painting an auto style outline when an element is focused.
However Firefox fails it, because even when it uses `:-moz-focusring`
(the equivalent to `:focus-visible`) in the UA stylesheet,
it uses dotted style for the outline.
WebKit doesn't support `:focus-visible` yet an it fails,
thought it's painting an auto style outline
(the background color doesn't match on the test).
@robdodson
Copy link
Contributor

Just ramping back up post-vacation, sorry for the dealy!

So if Chromium decides to change the UA sheet to use :focus-visible there'll be a change of behavior in those cases, when you click an element like the one in the example the outline would be gone after the change in the UA sheet.

Yes, I believe that's correct.

It'd be nice to understand why Chromium did this and why the UA sheet is still not using :focus-visible.

I think @alice can speak more to this. My guess is that we didn't want to change too many things at once so it seemed safer to ship :focus-visible first, let folks play around with it for a bit, and then update the UA stylesheet.

@alice
Copy link

alice commented Jan 21, 2021

@robdodson That's right. Wanted to make one change at a time.

@mrego
Copy link
Member

mrego commented Jan 21, 2021

Thanks for the feedback @robdodson and @alice, would you mind confirming that you agree with the change on HTML spec on @emilio's PR: whatwg/html#6256 ?

@alice
Copy link

alice commented Jan 21, 2021

It seems like that isn't blocked on me or Rob, but rather on feedback on https://crbug.com/1162070#c7

mrego added a commit to mrego/wpt that referenced this issue Jan 22, 2021
This patch adds 2 new tests to verify that the default UA style sheet
uses `:focus-visible { outline: auto; }`.
See: whatwg/html#6256 & w3c/csswg-drafts#4278

* focus-visible-017.html:
  This test checks that when you focus an element via script,
  it show a focus ring with `outline-style: auto`.
  Currently Chromium passes this test,
  because despite they don't use `:focus-visible` in the UA stylesheet,
  it's painting an auto style outline when an element is focused.
  However Firefox fails it, because even when it uses `:-moz-focusring`
  (the equivalent to `:focus-visible`) in the UA stylesheet,
  it uses dotted style for the outline.
  WebKit doesn't support `:focus-visible` yet an it fails,
  thought it's painting an auto style outline
  (the test is specifically checking for `:focus-visible` support).

* focus-visible-018.html:
  This test checks that when you click an element to focus it,
  it doesn't show any kind of focus ring.
  Currently Firefox passes this test, by Chromium fails it
  because Chromium is using `:focus` on the default UA stylesheet
  and is adding an outline on the element, despite it doesn't match
  `:focus-visible` (see https://crbug.com/1162070).
mrego added a commit to mrego/wpt that referenced this issue Jan 22, 2021
This patch adds 2 new tests to verify that the default UA style sheet
uses `:focus-visible { outline: auto; }`.
See: whatwg/html#6256 & w3c/csswg-drafts#4278

* focus-visible-017.html:
  This test checks that when you focus an element via script,
  it show a focus ring with `outline-style: auto`.
  Currently Chromium passes this test,
  because despite they don't use `:focus-visible` in the UA stylesheet,
  it's painting an auto style outline when an element is focused.
  However Firefox fails it, because even when it uses `:-moz-focusring`
  (the equivalent to `:focus-visible`) in the UA stylesheet,
  it uses dotted style for the outline.
  WebKit doesn't support `:focus-visible` yet an it fails,
  thought it's painting an auto style outline
  (the test is specifically checking for `:focus-visible` support).

* focus-visible-018.html:
  This test checks that when you click an element to focus it,
  it doesn't show any kind of focus ring.
  Currently Firefox passes this test, by Chromium fails it
  because Chromium is using `:focus` on the default UA stylesheet
  and is adding an outline on the element, despite it doesn't match
  `:focus-visible` (see https://crbug.com/1162070).
domenic pushed a commit to whatwg/html that referenced this issue Jan 22, 2021
mrego added a commit to web-platform-tests/wpt that referenced this issue Jan 25, 2021
This patch adds 2 new tests to verify that the default UA style sheet
uses `:focus-visible { outline: auto; }`.
See: whatwg/html#6256 & w3c/csswg-drafts#4278

* focus-visible-017.html:
  This test checks that when you focus an element via script,
  it show a focus ring with `outline-style: auto`.
  Currently Chromium passes this test,
  because despite they don't use `:focus-visible` in the UA stylesheet,
  it's painting an auto style outline when an element is focused.
  However Firefox fails it, because even when it uses `:-moz-focusring`
  (the equivalent to `:focus-visible`) in the UA stylesheet,
  it uses dotted style for the outline.
  WebKit doesn't support `:focus-visible` yet an it fails,
  thought it's painting an auto style outline
  (the test is specifically checking for `:focus-visible` support).

* focus-visible-018.html:
  This test checks that when you click an element to focus it,
  it doesn't show any kind of focus ring.
  Currently Firefox passes this test, by Chromium fails it
  because Chromium is using `:focus` on the default UA stylesheet
  and is adding an outline on the element, despite it doesn't match
  `:focus-visible` (see https://crbug.com/1162070).
@astearns astearns added this to the VF2F-2021-02-09 EUR milestone Feb 2, 2021
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 2, 2021
… in the default UA style sheet, a=testonly

Automatic update from web-platform-tests
[selectors] Add tests for :focus-visible in the default UA style sheet

This patch adds 2 new tests to verify that the default UA style sheet
uses `:focus-visible { outline: auto; }`.
See: whatwg/html#6256 & w3c/csswg-drafts#4278

* focus-visible-017.html:
  This test checks that when you focus an element via script,
  it show a focus ring with `outline-style: auto`.
  Currently Chromium passes this test,
  because despite they don't use `:focus-visible` in the UA stylesheet,
  it's painting an auto style outline when an element is focused.
  However Firefox fails it, because even when it uses `:-moz-focusring`
  (the equivalent to `:focus-visible`) in the UA stylesheet,
  it uses dotted style for the outline.
  WebKit doesn't support `:focus-visible` yet an it fails,
  thought it's painting an auto style outline
  (the test is specifically checking for `:focus-visible` support).

* focus-visible-018.html:
  This test checks that when you click an element to focus it,
  it doesn't show any kind of focus ring.
  Currently Firefox passes this test, by Chromium fails it
  because Chromium is using `:focus` on the default UA stylesheet
  and is adding an outline on the element, despite it doesn't match
  `:focus-visible` (see https://crbug.com/1162070).

--

wpt-commits: 08069be5028d00518abd36e132275252937a34d3
wpt-pr: 27015
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Feb 3, 2021
… in the default UA style sheet, a=testonly

Automatic update from web-platform-tests
[selectors] Add tests for :focus-visible in the default UA style sheet

This patch adds 2 new tests to verify that the default UA style sheet
uses `:focus-visible { outline: auto; }`.
See: whatwg/html#6256 & w3c/csswg-drafts#4278

* focus-visible-017.html:
  This test checks that when you focus an element via script,
  it show a focus ring with `outline-style: auto`.
  Currently Chromium passes this test,
  because despite they don't use `:focus-visible` in the UA stylesheet,
  it's painting an auto style outline when an element is focused.
  However Firefox fails it, because even when it uses `:-moz-focusring`
  (the equivalent to `:focus-visible`) in the UA stylesheet,
  it uses dotted style for the outline.
  WebKit doesn't support `:focus-visible` yet an it fails,
  thought it's painting an auto style outline
  (the test is specifically checking for `:focus-visible` support).

* focus-visible-018.html:
  This test checks that when you click an element to focus it,
  it doesn't show any kind of focus ring.
  Currently Firefox passes this test, by Chromium fails it
  because Chromium is using `:focus` on the default UA stylesheet
  and is adding an outline on the element, despite it doesn't match
  `:focus-visible` (see https://crbug.com/1162070).

--

wpt-commits: 08069be5028d00518abd36e132275252937a34d3
wpt-pr: 27015

UltraBlame original commit: 990ee1b12d5a1243273aa37a90bd99326eb8dcf8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Feb 3, 2021
… in the default UA style sheet, a=testonly

Automatic update from web-platform-tests
[selectors] Add tests for :focus-visible in the default UA style sheet

This patch adds 2 new tests to verify that the default UA style sheet
uses `:focus-visible { outline: auto; }`.
See: whatwg/html#6256 & w3c/csswg-drafts#4278

* focus-visible-017.html:
  This test checks that when you focus an element via script,
  it show a focus ring with `outline-style: auto`.
  Currently Chromium passes this test,
  because despite they don't use `:focus-visible` in the UA stylesheet,
  it's painting an auto style outline when an element is focused.
  However Firefox fails it, because even when it uses `:-moz-focusring`
  (the equivalent to `:focus-visible`) in the UA stylesheet,
  it uses dotted style for the outline.
  WebKit doesn't support `:focus-visible` yet an it fails,
  thought it's painting an auto style outline
  (the test is specifically checking for `:focus-visible` support).

* focus-visible-018.html:
  This test checks that when you click an element to focus it,
  it doesn't show any kind of focus ring.
  Currently Firefox passes this test, by Chromium fails it
  because Chromium is using `:focus` on the default UA stylesheet
  and is adding an outline on the element, despite it doesn't match
  `:focus-visible` (see https://crbug.com/1162070).

--

wpt-commits: 08069be5028d00518abd36e132275252937a34d3
wpt-pr: 27015

UltraBlame original commit: 990ee1b12d5a1243273aa37a90bd99326eb8dcf8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Feb 3, 2021
… in the default UA style sheet, a=testonly

Automatic update from web-platform-tests
[selectors] Add tests for :focus-visible in the default UA style sheet

This patch adds 2 new tests to verify that the default UA style sheet
uses `:focus-visible { outline: auto; }`.
See: whatwg/html#6256 & w3c/csswg-drafts#4278

* focus-visible-017.html:
  This test checks that when you focus an element via script,
  it show a focus ring with `outline-style: auto`.
  Currently Chromium passes this test,
  because despite they don't use `:focus-visible` in the UA stylesheet,
  it's painting an auto style outline when an element is focused.
  However Firefox fails it, because even when it uses `:-moz-focusring`
  (the equivalent to `:focus-visible`) in the UA stylesheet,
  it uses dotted style for the outline.
  WebKit doesn't support `:focus-visible` yet an it fails,
  thought it's painting an auto style outline
  (the test is specifically checking for `:focus-visible` support).

* focus-visible-018.html:
  This test checks that when you click an element to focus it,
  it doesn't show any kind of focus ring.
  Currently Firefox passes this test, by Chromium fails it
  because Chromium is using `:focus` on the default UA stylesheet
  and is adding an outline on the element, despite it doesn't match
  `:focus-visible` (see https://crbug.com/1162070).

--

wpt-commits: 08069be5028d00518abd36e132275252937a34d3
wpt-pr: 27015

UltraBlame original commit: 990ee1b12d5a1243273aa37a90bd99326eb8dcf8
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Feb 4, 2021
… in the default UA style sheet, a=testonly

Automatic update from web-platform-tests
[selectors] Add tests for :focus-visible in the default UA style sheet

This patch adds 2 new tests to verify that the default UA style sheet
uses `:focus-visible { outline: auto; }`.
See: whatwg/html#6256 & w3c/csswg-drafts#4278

* focus-visible-017.html:
  This test checks that when you focus an element via script,
  it show a focus ring with `outline-style: auto`.
  Currently Chromium passes this test,
  because despite they don't use `:focus-visible` in the UA stylesheet,
  it's painting an auto style outline when an element is focused.
  However Firefox fails it, because even when it uses `:-moz-focusring`
  (the equivalent to `:focus-visible`) in the UA stylesheet,
  it uses dotted style for the outline.
  WebKit doesn't support `:focus-visible` yet an it fails,
  thought it's painting an auto style outline
  (the test is specifically checking for `:focus-visible` support).

* focus-visible-018.html:
  This test checks that when you click an element to focus it,
  it doesn't show any kind of focus ring.
  Currently Firefox passes this test, by Chromium fails it
  because Chromium is using `:focus` on the default UA stylesheet
  and is adding an outline on the element, despite it doesn't match
  `:focus-visible` (see https://crbug.com/1162070).

--

wpt-commits: 08069be5028d00518abd36e132275252937a34d3
wpt-pr: 27015
@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-selectors-4] browser focus styles and focus-visible, example 38, and agreed to the following:

  • RESOLVED: remove the example
The full IRC log of that discussion <myles> Topic: [css-selectors-4] browser focus styles and focus-visible, example 38
<myles> GitHub: https://github.com//issues/4278
<myles> rego: florian reported it, but I added it to the agenda
<myles> rego: florian was asking about focus-visible in the spec. Was asking about using focus-visible to remove the old line from the element
<myles> rego: The thing is that, this was confusing to some people, and kind of a hack to disable the whole line instead of the focus when you have focus visible, to see the whole line but not always
<myles> rego: this is kind of confusing. you expect when it matches focus-visible, it matches only when the outline is painted.
<myles> rego: and if it's not painted it's not
<myles> rego: chromium was not using that in its default visible. So you would get an outline but the element wasn't matching focus-visible
<florian> q+
<myles> rego: Chromium's impl is updated. The default stylesheet uses focus-visible. So this example can be removed from the spec. Because it was only due to some browsers' implementations.
<myles> florian: We should double remove it.
<myles> florian: This is no longer how browsers work. It shouldn't stay there. Also, even when we were before that change, specs are a bad place to put descriptions of hacks you need to use to force browsers to not follow the spec behave correctly. And if we do that, it needs to be described deliberately
<myles> florian: now that it's no longer relevant, remove it, and if we need to highlight workarounds in the spec, be clear they are workarounds.
<Rossen_> q?
<Rossen_> ack florian
<myles> rego: So the proposal is to remove the example from the sepc
<myles> bkardell_: We should remove it. My recollection is that we added that to help people understand what it was doing, because you could explain that focused matched all the time, and people said it this way, but people wanted to remove it when that wasn't the case. but that made it into the spec in a way that it should not have. we should take it out.
<myles> Rossen_: proposed resolution: remove the example
<fantasai> If we agree on something, we resolve on it, so it's clear there was an agreement.
<myles> RESOLVED: remove the example

mrego added a commit to mrego/csswg-drafts that referenced this issue Feb 10, 2021
:focus:not(:focus-visible) is a workaround due to some implementations
not following the spec (not using :focus-visible in the default UA style sheet).
Apart that this is no longer needed as implementations have been updated,
this kind of workarounds shouldn't be in the spec as they're confusing.

Fixes w3c#4278
mrego added a commit to mrego/csswg-drafts that referenced this issue Feb 10, 2021
…#4278)

:focus:not(:focus-visible) is a workaround due to some implementations
not following the spec (not using :focus-visible in the default UA style sheet).
Apart that this is no longer needed as implementations have been updated,
this kind of workarounds shouldn't be in the spec as they're confusing.

Fixes w3c#4278
mrego added a commit to mrego/csswg-drafts that referenced this issue Feb 10, 2021
…3c#4278)

:focus:not(:focus-visible) is a workaround due to some implementations
not following the spec (not using :focus-visible in the default UA style sheet).
Apart that this is no longer needed as implementations have been updated,
this kind of workarounds shouldn't be in the spec as they're confusing.

Fixes w3c#4278
frivoal pushed a commit that referenced this issue Feb 11, 2021
…4278) (#5974)

:focus:not(:focus-visible) is a workaround due to some implementations
not following the spec (not using :focus-visible in the default UA style sheet).
Apart that this is no longer needed as implementations have been updated,
this kind of workarounds shouldn't be in the spec as they're confusing.

Fixes #4278
nschonni pushed a commit to nschonni/csswg-drafts that referenced this issue Feb 15, 2021
…3c#4278) (w3c#5974)

:focus:not(:focus-visible) is a workaround due to some implementations
not following the spec (not using :focus-visible in the default UA style sheet).
Apart that this is no longer needed as implementations have been updated,
this kind of workarounds shouldn't be in the spec as they're confusing.

Fixes w3c#4278
imhele added a commit to imhele/html that referenced this issue Feb 18, 2021
* Editorial: remove redundant "the"

* Meta: default branch rename

Also correct a broken link. Not even w3.org URLs are that cool.

Helps with whatwg/meta#174.

* Editorial: clean up calls to "parse a URL"

It actually takes a string, so calls should be clear about that.

* Review Draft Publication: January 2021

* Simplify <link>s

In particular, remove their activation behavior, stop them from matching
:link and :visited, and stop suggesting that they be focusable areas.

This also includes a slight expansion and rearrangement of the link
element's section to make it clearer what hyperlinks created by <link>
are meant for, contrasting them to <a> and <area> hyperlinks.

Closes whatwg#4831. Closes whatwg#2617. Helps with whatwg#5490.

* Meta: remove demos/offline/* (whatwg#6307)

These are no longer needed as of e4330d5.

* Meta: minor references cleanup

Use more HTTPS and drop obsolete HTML Differences reference.

* Editorial: anticlockwise → counterclockwise

We use en-US these days. Spotted in https://twitter.com/iso2022jp/status/1352601086519955456.

* Use :focus-visible in the UA stylesheet

See w3c/csswg-drafts#4278.

* Editorial: align with WebIDL and Infra

* Fix "update a style block" early return

The new version matches implementation reality and CSSWG resolution.

The algorithm was also inconsistent, as it looked at whether
the element was in a shadow tree or in the document tree, but it was
only specified to be re-run if the element becomes connected or
disconnected.

The CSSWG discussed this in
w3c/csswg-drafts#3096 (comment)
and http://wpt.live/shadow-dom/ShadowRoot-interface.html tests this.

This also matches closer the definition of <link rel="stylesheet">,
which does use connectedness (though it uses "browsing-context
connected", which is a bit different):
https://html.spec.whatwg.org/#link-type-stylesheet

* Modernize and refactor simple dialogs

This contains a small bug fix, in that confirm() and prompt() said
"return" in some cases instead of "return false" or "return null" as
appropriate.

Other notable changes, all editorial, are:

* Factoring out repeated "cannot show simple dialogs" steps, which will
  likely expand over time (see e.g. whatwg#6297).
* Separating out and explaining the no-argument overload of alert().
* Passing the document through to the "printing steps", instead of just
  having them talk about "this Window object".

* Meta: add definition markup for MessageEvent

* Remove <marquee> events

They are only supported by one engine (Gecko).

Closes whatwg#2957.

* Clarify when microtasks happen

* Ignore COEP on non-secure contexts

Fixes whatwg#6328.

* Editorial: update URL Standard integration

* Editorial: only invoke response's location URL once

Complements whatwg/fetch#1149.

* Track the incumbent settings and active script in Promise callbacks

Closes whatwg#5213.

* createImageBitmap(): stop clipping sourceRect to source's dimensions

It has been found in whatwg#6306 that this was an oversight at the time of its introduction. Current behavior goes against author expectations and no implementer has opposed the change to "no-clip".

Tests: web-platform-tests/wpt#27040.

Closes whatwg#6306.

* Remove CSP plugin-types blocking

With Flash not being supported anymore, the CSP directive plugin-types has lost its main reason for being and is being removed from the Content Security Policy specification: w3c/webappsec-csp#456.

This change removes references to the relevant algorithm from the Content Security Policy spec.

* Meta: set more dfn types

A follow-up to:

* whatwg#5694
* whatwg#5916

* Editorial: occuring → occurring

* Make all plugin-related APIs no-ops

Part of whatwg#6003.

* Disallow simple dialogs from different-origin domain iframes

Closes whatwg#5407.

* Revive @@iterator for PluginArray/MimeTypeArray/Plugin

@@iterator is implicitly installed by defining an indexed property getter. Since there is no other way to define it exclusively, this restores some methods back to being indexed getters.

This fixes an inadvertent observable behavior change in d4f07b8.

* Adjust web+ scheme security considerations to account for FTP removal

Also, network scheme is now reduced to HTTP(S) scheme.

Helps with whatwg#5375, but form submission issue remains.

See whatwg/fetch#1166 for context.

* Meta: export pause

Nobody but XMLHttpRequest take a dependency on this please. You have been warned.

Context: whatwg/xhr#311.

* Fix typo: ancestor → accessor

Fixes whatwg#6374.

Co-authored-by: Dominic Farolino <domfarolino@gmail.com>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Co-authored-by: Domenic Denicola <d@domenic.me>
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>
Co-authored-by: Momdo Nakamura <xmomdo@gmail.com>
Co-authored-by: Jake Archibald <jaffathecake@gmail.com>
Co-authored-by: Yutaka Hirano <yhirano@chromium.org>
Co-authored-by: Shu-yu Guo <syg@chromium.org>
Co-authored-by: Kaiido <tristan.fraipont@gmail.com>
Co-authored-by: Antonio Sartori <anton.sartori@gmail.com>
Co-authored-by: Michael[tm] Smith <mike@w3.org>
Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
Co-authored-by: Carlos IL <carlosjoan91@gmail.com>
Co-authored-by: Kagami Sascha Rosylight <saschanaz@outlook.com>
Co-authored-by: Simon Pieters <zcorpan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
selectors-4 Current Work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants