iron-list
iron-list copied to clipboard
Add "shift-select" a11y functionality
This is a PR to represent #204 - It is not complete yet (still needs tests, documentation, we need to decide whether or not this should be opt-in, or on-by-default, etc) but I wanted to have the code out there to play with.
I think it might be nice to get an a11y
expert to take a look at this as there is some interesting use cases to be considered.
Thanks for the PR @jshcrowthe!
In https://github.com/PolymerElements/iron-list/issues/204 you said:
The thought was, because I am working with private API of the element, (e.g. this._getNormalizedItem(item), this._physicalItems.map(...), etc) that the functionality would be local to the element itself. However I was thinking that I should probably gate it behind a property to make it opt-in.
selectItem
and deselectItem
are public. Also, Templatizer
defines modelForElement(target)
where modelForElement(target)[list.as]
is the object instance. I think with the current API, it should be easy to build a multi selection demo. wdyt?
Hey Josh, any update on this? Shift select is a feature that I am very interested in as well :-)