eBay / skin

Pure CSS framework designed & developed by eBay for a branded, e-commerce marketplace.
https://ebay.github.io/skin/
MIT License
178 stars 67 forks source link

Listbox: new DS6 style #38

Closed ianmcburnie closed 6 years ago

ianmcburnie commented 6 years ago

Design team have expressed a preference to use the native listbox (i.e. the overlay cannot be styled with CSS. In order to retain the features of the

Pressing up and down arrow cycles through options. Pressing SPACE expands the listbox of options.

This means we also go back to the drawing board in skin to style a textbox to look like the expand button. Hopefully this is straightforward.

I am going to update the MIND patterns and hopefully put together a quick prototype.

Also, everything I have written above is for single-select only. I'm hoping multi-select can be achieved by using role="listbox" instead of role="combobox", but more investigation is needed.

Related reading: https://github.com/w3c/html/issues/1013

Key piece from spec:

Allowed ARIA role attribute values: (with NO multiple attribute and NO size attribute having value greater than 1) combobox or (with a multiple attribute or a size attribute having value greater than 1) listbox

ianmcburnie commented 6 years ago

I updated the mind pattern example:

http://ianmcburnie.github.io/mindpatterns/input/listbox/

And docs:

https://ebay.gitbooks.io/mindpatterns/content/input/listbox.html

So far support seems good in IE+JAWS, FF+NVDA, Safari+VO, Chrome + Chromevox

seangates commented 6 years ago

Thanks, @ianmcburnie!

seangates commented 6 years ago

Current state of things: https://github.com/eBay/skin/commit/7709f1f4a051109ce4ca6d8b176605aa44f16463

seangates commented 6 years ago

Done!