Very nice and thorough article !
Just one thing: I would advice to set role and tabindex only if the consumer of the component has not set them itself. With your implementation, there is no way to make the component skip the tab sequence:
Thanks for the tip! Apparently this is something I did in my deployed version; it's been a few months since I wrote this article and my guess is I must have cut it due to the article's enormous length.
It's important though, so I'll be sure to add a note in!
For further actions, you may consider blocking this person and/or reporting abuse
The Community Platform for Web Components Users and Developers
Very nice and thorough article !
Just one thing: I would advice to set
role
andtabindex
only if the consumer of the component has not set them itself. With your implementation, there is no way to make the component skip the tab sequence:So one can explicitly skip the element:
Also in this case, that is not mandatory to clean the listeners on the disconnected lifecycle, although that is a good habit to take :D
Thanks for the tip! Apparently this is something I did in my deployed version; it's been a few months since I wrote this article and my guess is I must have cut it due to the article's enormous length.
It's important though, so I'll be sure to add a note in!