{"id":295,"date":"2023-12-19T21:34:06","date_gmt":"2023-12-19T21:34:06","guid":{"rendered":"https:\/\/frontendmasters.com\/blog\/?p=295"},"modified":"2023-12-19T21:34:06","modified_gmt":"2023-12-19T21:34:06","slug":"%f0%9f%9a%ab-multiple-selects","status":"publish","type":"post","link":"https:\/\/frontendmasters.com\/blog\/%f0%9f%9a%ab-multiple-selects\/","title":{"rendered":"\ud83d\udeab Multiple Selects"},"content":{"rendered":"\n<p>A good point by Mayank:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The\u00a0<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/select#multiple\"><code>multiple<\/code><\/a>\u00a0attribute on\u00a0<code>&lt;select><\/code>\u00a0<a href=\"https:\/\/www.24a11y.com\/2019\/select-your-poison-part-2\/#:~:text=around%20this%20behavior.-,Multi%2Dselect,-Multi%2Dselect%20Variant\">should pretty much never be used<\/a>. It&#8217;s like the polar opposite of single\u00a0<code>&lt;select><\/code>, where instead of universal familiarity, it has universal unfamiliarity. Perhaps its only saving grace is that I have yet to encounter this attribute in any codebase.<\/p>\n<cite><a href=\"https:\/\/www.htmhell.dev\/adventcalendar\/2023\/13\/\">HTML: The Bad Parts<\/a><\/cite><\/blockquote>\n\n\n\n<!--more-->\n\n\n\n<p>It&#8217;s pretty fair to say that everyone knows how to use a native select element. But add that one little attribute, <code><a href=\"https:\/\/codepen.io\/chriscoyier\/pen\/wvOwoPq\">&lt;select multiple><\/a><\/code>, and now hardly anyone knows how it works. It turns into a weird box UI that you rarely see, and you just need to know how it works. I had to test, and it seems on my machine holding the shift or command key will allow you turn on\/off multiple options, but I wouldn&#8217;t be surprised if that varied from machine to machine and keyboard to keyboard, and it&#8217;s a totally different look\/experience on mobile OSs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A good point by Mayank: The\u00a0multiple\u00a0attribute on\u00a0&lt;select>\u00a0should pretty much never be used. It&#8217;s like the polar opposite of single\u00a0&lt;select>, where instead of universal familiarity, it has universal unfamiliarity. Perhaps its only saving grace is that I have yet to encounter this attribute in any codebase. HTML: The Bad Parts<\/p>\n","protected":false},"author":1,"featured_media":296,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[29],"tags":[49,31,50],"class_list":["post-295","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-the-beat","tag-accessibility","tag-html","tag-select"],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2023\/12\/multi-select-thumb.jpg?fit=1000%2C500&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/comments?post=295"}],"version-history":[{"count":1,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/295\/revisions"}],"predecessor-version":[{"id":297,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/295\/revisions\/297"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media\/296"}],"wp:attachment":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media?parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/categories?post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/tags?post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}