DEV Community

Discussion on: Become an A11y Advocate! In the battle for an inclusive internet (Part1)

Collapse
 
aziziyazit profile image
Azizi Yazit

Angular used web-components. For example if we want to create a button we will always create new custom button instead of using the semantic button. Can you share best practice to tackle this. Thanks.

Collapse
 
anfibiacreativa profile image
Natalia Venditto

Good point. You mean when you create a component, being whatever it is, the @Component decorator creates an element/selector in the DOM, called as the property selector indicates, that as any HTMLElement has a bunch of properties. But it is multipurpose, and the key is what you put inside the template. When I create a button component, <app-button> will have a native <button> element in its template.

Collapse
 
aziziyazit profile image
Azizi Yazit

Thank you for replying! Will do that.