Re: [w3c/webcomponents] Focus delegation from shadow host should not behave like sequential focus navigation (#830)

I've been spending some time on a delegatesFocus polyfill at Salesforce and I support the proposed behavior. I think it makes sense that click and programmatic focus behavior are not influenced by the sequential focus navigation order because the default user experience should be consistent. It's considered a bad practice to go crazy with `tabindex` values because that can potentially ruin the user experience and I would prefer that the default behavior is not tied to that.

In terms of control, components could do the following for programmatic:

```js
class Foo extends HTMLElement {
  focus() {
    this.shadowRoot.querySelector('input').focus(); 
  }
}
```

This is what our internal components are required to do so that we don't break them once the expected behavior is specified and our framework is ready to implement it.

I'm not sure if anything can be done for clicks using existing APIs but I wonder if the component really needs control over that?





-- 
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/830#issuecomment-526417064

Received on Friday, 30 August 2019 01:17:25 UTC