material icon indicating copy to clipboard operation
material copied to clipboard

mdSelect: Add select component

Open ajoslin opened this issue 12 years ago • 105 comments

The mdSelect is a type of Material Design Menu that behaves like and resembles a <select>.

Menu behavior

Functional requirements

- Menu should be positioned over their "emitting" elements, establishing context - The selected menu item should not be shown as a duplicate when expanded - Dismiss menu by selecting an item (unless selecting multiple), tapping outside the menu, or using the Escape key - Menu animates out from emitting item when expanding

Accessibility requirements

- **mdSelect element** - `[aria-live="polite"]` makes sure selections are announced in a screen reader. Copy list item text to button only when selection is made with enter/space key, or click (not arrow keys). That way it won't read aloud twice. - **Button element** - `[aria-haspopup="true"]` indicates button launches associated input - `[aria-controls="_listID_"]` links button to options list - Needs unique ID for pairing with list - **Unordered list** - [`role="menu"`](http://www.w3.org/TR/wai-aria/roles#menu) to communicate purpose of list - `aria-labelledby="_buttonID_"` to pair with button element - `aria-expanded="true | false"` to indicate when associated panel is expanded - Unique ID for pairing with button - `tabindex="-1"`to script focus but remove from tab order - **Child list items** - [`role="menuitem"`](http://www.w3.org/TR/wai-aria/roles#menuitem) on each child item - `tabIndex="-1"` for scripting

Resources

- [WAI-ARIA Listbox](http://www.w3.org/TR/wai-aria/roles#listbox) - [Using "listbox" and "option" roles vs. "menu" and "menuitem"](http://www.marcozehe.de/2014/03/11/easy-aria-tip-7-use-listbox-and-option-roles-when-constructing-autocomplete-lists/)

ajoslin avatar Sep 17 '14 13:09 ajoslin

+1 for dropdown component

demisx avatar Dec 26 '14 00:12 demisx

+1 I really would like to see this one because I wanted to use Angular Material on one of our projects.

ToastShaman avatar Dec 26 '14 10:12 ToastShaman

:+1: Would love to see this.

ethanmick avatar Dec 26 '14 20:12 ethanmick

+1 for md-select. Was hoping to get at least a basic implementation in 0.7.0, but I see that it's actually slated for 0.8.0. At least the planned release is only a month away!

seiyria avatar Dec 28 '14 08:12 seiyria

+1 with a select I'd be more willing to rewrite my app on material and likely convert ng-scrolling-table to use md theming to boot

jadrake75 avatar Dec 31 '14 01:12 jadrake75

+1

fundon avatar Dec 31 '14 04:12 fundon

+1 for md-dropdown and md-datetime

wayou avatar Jan 02 '15 08:01 wayou

+1

sebastianhenneberg avatar Jan 03 '15 18:01 sebastianhenneberg

+1 for your work guys. This is a highly expected component since it's part of the base of components used in the majority of web applications. I was actually working on creating a web-app for my company with the library until I stumble accross this. Can't wait for it to be ready. Thanks again!

nachoargentina avatar Jan 05 '15 04:01 nachoargentina

+1

dgroomes avatar Jan 06 '15 23:01 dgroomes

+1

louisdmli avatar Jan 08 '15 07:01 louisdmli

+1

utopiaio avatar Jan 08 '15 13:01 utopiaio

+1 this is highly expected for us too. Thanks for your great job !

kolxo avatar Jan 08 '15 15:01 kolxo

+1

edotassi avatar Jan 08 '15 17:01 edotassi

+1

mramanauskas avatar Jan 08 '15 20:01 mramanauskas

+1

luclanet avatar Jan 09 '15 11:01 luclanet

+1 Eagerly waiting for this component. Awesome Job BTW!

saramalla avatar Jan 10 '15 08:01 saramalla

+1 for md-dropdown and md-datetime

lievenjanssen avatar Jan 12 '15 10:01 lievenjanssen

If you quickly need some solution for this, I've made for my purposes quick CSS styling for native <input>, you can find it here. Looks good on Chrome, IE10 (probably IE10+), probably Firefox 25+.

Image

yarl avatar Jan 12 '15 12:01 yarl

Thanks for that @yarl -- it's better than having the default styling for sure!

seiyria avatar Jan 12 '15 14:01 seiyria