Re: [w3c/webcomponents] :focus behavior of delegatesFocus:true will be confusing for users (#554)

So we cannot close this issue until we have some way to override the focus ring behavior when UA uses `:focus { ... !important }` ?

I'm not sure whether such use cases happen, and focus ring decoration shouldn't imply any security, so maybe for accessibility correctness?

I'm not sure for such cases actually happen, but considering from different angle that the default `:focus` behavior for `delegatesFocus=true` is surprising to authors/users is the original concern, we may change the default behavior.

Here are options I have, in the order of my preference.

1. Add a flag (e.g. add `matchesPseudoFocus=true` to shadow root option, defaulting `false` and decouple the meaning from `delegatesFocus=true`) to control the `:focus` matching behavior.
2. Abandon `:focus` matching for shadow hosts with `delegatesFocus=true` so that the problem should not happen.
3. Having a normative sentence in the spec so that UA stylesheet should not use `:focus { outline: ... !important }` to guarantee it is overridable.

As we have a use case for matching `:focus` (`<date-input>`), I would like to avoid 2, and 3 seems somewhat weird.

@alice @ebidel @robdodson @rniwa @annevk any thoughts?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/554#issuecomment-243971172

Received on Thursday, 1 September 2016 04:11:23 UTC