1. -3

  2. 8

    I recommend against implementing a drop-down as described in the article, even for simple use-cases. The resulting drop-down doesn’t support keyboard shortcuts such as pressing Tab to focus the drop-down, or pressing Space to open the drop-down and select a value, up/down arrows to select a value, or typing the first letter of a value to select it. This lack of functionality will slow advanced users down, and will prevent users with certain disabilities from using the page.

    If the styling available for the built-in select and option is not enough, I recommend one of those existing “javascript libraries and css frameworks, which have own implementation for custom select dropdowns” mentioned by the article.

    I would expect an article about implementing custom form elements to at least mention the technique of using a label to make your custom elements control an actual select element behind the scenes. With how useless this article is and how many ads are on the linked page, this submission is dangerously close to spam.

    1. 1

      What are you talking about? There are no ads!

      This comment is ridiculous! If you find a tutorial on web components which doesn’t implement accessibility standards then it’s useless? Please tell me this is an illusion. Apparently, you have never developed MVP’s for startups.