We have been creating Web Components in the previous sections, but, other than the accessibility, no other sections tell us what defines a good component. So, let's talk about it. The Gold Standard Checklist is a working draft (see https://github.com/webcomponents/gold-standard/wiki) that tells the creators of a Web Component what things should be taken care of in order to create a good, reusable component.Â
Let's talk about some of the points that I personally feel are important:
- Web components should be accessible. In order to make the Web Components work on all screens, we need to make sure that the component covers all aspects of accessibility.Â
- Binding of events should be done in connectedCallback(). This makes sure that the DOM to which events are bound will always be present, thus reducing the number of bugs.
- Event bindings should...