material-components / material-components-web

Modular and customizable Material Design UI components for the web
https://material.io/develop/web
MIT License
17.11k stars 2.15k forks source link

[mdc-list] support selection through shift + arrow keys #6364

Open devversion opened 3 years ago

devversion commented 3 years ago

Feature Request

MDC list in checkbox mode should support selection by pressing SHIFT with an arrow key. This would match the recommended shortcuts for a listbox as per W3C.

See: https://www.w3.org/TR/wai-aria-practices-1.1/#listbox_kbd_interaction

Proposed solution

The MDC list foundation already handles keyboard interaction quite good. e.g. arrow keys, home and end keys, and a typeahead. It should be straightforward to add support for the shift modifier key here.

joyzhong commented 3 years ago

Agree that we should add support for the optional multi-select listbox shift + keypress selection models listed in https://www.w3.org/TR/wai-aria-practices-1.1/#listbox_kbd_interaction.

Adding to backlog.