ibm-js / deliteful

Multichannel (desktop/mobile) UI Custom Elements Library
http://ibm-js.github.io/deliteful
Other
70 stars 36 forks source link

List: support true grid with multiple role=gridcell per row #720

Closed wkeese closed 5 years ago

wkeese commented 5 years ago

Enhance lists to support multiple gridcells per row.

Lists with type=grid currently puts everything inside one role=gridcell, which makes screenreaders announce that the grid only has one column, regardless of how many it really has.

Also, support multiple rows per renderer, in order to allow for expandable rows like on https://www.carbondesignsystem.com/components/data-table/code#expandable-data-table.

Part of this change is to move the aria-selected attribute from the role=gridcell to the role=row.

Another part involves removing the Renderer#renderNode property. If the List is of type "menu", "listbox" or "list", then this.renderNode === this, the property is redundant. (See #611). If the List is of type "grid", then Renderer subclasses may have multiple "gridcell" children, so a single renderNode property doesn't make sense.