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

Based on #78.

ajoslin avatar Oct 07 '14 16:10 ajoslin

FYI, I mentioned this issue on the Google+ release announcement for 0.4 - https://plus.google.com/u/0/+AngularJS/posts/4KCuTwvCgfG

Lots of us are looking forward to it!

ScottRFrost avatar Oct 07 '14 20:10 ScottRFrost

+1 for this component. Bummed that it isn't slotted anywhere yet (clearly it's not happening in 0.5!)

ewinslow avatar Nov 24 '14 23:11 ewinslow

We're working on it for 0.7.0.. the issue was just out of date.

ajoslin avatar Nov 24 '14 23:11 ajoslin

+1 for this component ! :)

MickaelBergem avatar Dec 10 '14 13:12 MickaelBergem

I was excited when bower updated to 0.6.1, then I came here and saw select is pushed back to (at least) 0.7. :unamused:

ScottRFrost avatar Dec 10 '14 21:12 ScottRFrost

Something like this would be awesome : http://ui.lumapps.com/directives/selects

jgoux avatar Dec 10 '14 22:12 jgoux

We'll get to it ASAP

ajoslin avatar Dec 11 '14 04:12 ajoslin

Yeah thanks, i am planing a application on ng-material and it surely lacks select and time & date pickers

vipulsaxena avatar Dec 11 '14 10:12 vipulsaxena

+1

baio avatar Dec 11 '14 18:12 baio

We will start working on the Select component next week... stay tuned for something in January.

ThomasBurleson avatar Dec 11 '14 19:12 ThomasBurleson

Looking forward to md-dropdown and md-datetime +1

thanhtung1509 avatar Dec 12 '14 04:12 thanhtung1509

+1 for md-dropdown and md-datetime

vishvajit-sonagara avatar Dec 12 '14 05:12 vishvajit-sonagara

+1 too

vnnoder avatar Dec 12 '14 06:12 vnnoder

:+1:

franklyio avatar Dec 12 '14 11:12 franklyio

The lumapps components are currently inaccessible, FWIW. It will be challenging to get right, but I'm excited to see the Angular Material version start to happen!

marcysutton avatar Dec 17 '14 21:12 marcysutton

@marcysutton - Your comments are entirely valid regarding their ARIA support. The LumApp components were very quickly developed, however, with fast iterations to meet specific project requirements. As such the results are impressive for their focused sprint efforts.

ThomasBurleson avatar Dec 17 '14 23:12 ThomasBurleson

Will the select component support multi-select? The only reason I have to think otherwise is that md-checkbox doesn't support ng-checked like the pure angular checkbox.

ghost avatar Dec 21 '14 06:12 ghost

+1

nmabhinandan avatar Dec 25 '14 07:12 nmabhinandan

Very Cool

MBurtsev avatar Dec 25 '14 21:12 MBurtsev