- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 18 Feb 2021 15:30:37 -0800
- To: Emilio Cobos Álvarez <emilio@crisal.io>
- Cc: Alice Boxhall <aboxhall@google.com>, fantasai <fantasai@inkedblade.net>, www-archive@w3.org
On Thu, Feb 18, 2021 at 2:38 PM Emilio Cobos Álvarez <emilio@crisal.io> wrote:
> On 2/18/21 22:42, Tab Atkins Jr. wrote:
> > All of them instead seem
> > to treat "focused by script" the same as "focused by a click",
> > regardless of what was previously focused.
>
> That doesn't seem true? This shows an outline in Firefox (85 and
> Nightly) and Chrome (Dev edition), afaict:
>
> <!doctype html>
> <div tabindex=0>
> Should see an outline.
> </div>
> <script>
> onload = () => document.querySelector("div").focus();
> </script>
>
> What am I missing?
Well, Chrome draws a focus ring on that element on click too, so it's
still consistent. I guess Firefox does treat them differently, but at
least with regards to the "pay attention to what was previously
focused" text, both seem to ignore what was previously focused.
~TJ
Received on Thursday, 18 February 2021 23:31:06 UTC