Open rolfsmeds opened 4 years ago
Notes about how this could be implemented:
aria-controls
on the toggle column cells to refer to the details cell, screen reader support for it is woefully lacking.aria-expanded
is probably all we have to work with (in terms of ARIA features actually supported by screen readers), but I haven't been able to find information on whether it's actually supported on gridcell
elements. If not, we could set the attribute on the button inside the cell instead, although that will probably mean it won't be announced unless focus is moved from the cell to the button inside. Also need to check if aria-expanded
works when the referred element has display:none
when collapsed.aria-label
on the cell/button will be hardcoded in English, until https://github.com/vaadin/web-components/issues/3471 is fixed.setDetailsVisibleOnClick(false)
in the Flow Grid in order to disable opening details on clicks elsewhere on the row. A parameter could perhaps be used to choose this, e.g. setDetailsToggleColumnVisible(boolean toggleVisible, boolean rowClickToggleEnabled)
Some notes from my investigation:
setDetailsToggleColumnVisible
just automatically adds the column, how is it ordered in case there are other frozen-to-end columns? Should users have a way to get a reference to the column so that they can change the order (not possible with selection column currently)? Easiest would probably be to always show it as the first frozen-to-end column.I'd say it should always be the last frozen-to-end column, just like the selection column is always the first frozen-to-start column.
An additional detail here is that we've had a request to make it possible to have the details toggle frozen-to-start instead, so that would then require some kind of API for that choice.
A static column for toggling row details would be beneficial in the following ways:
vaadin-grid-pro
by providing a dedicated toggle element.