vaadin / web-components

A set of high-quality standards based web components for enterprise web applications. Part of Vaadin 20+
https://vaadin.com/docs/latest/components
447 stars 83 forks source link

[grid-pro] Enable feature to allow tab focusing non editable columns #2547

Open stefanuebe opened 3 years ago

stefanuebe commented 3 years ago

Describe your motivation

We have a grid pro, where users are traversing it using the keyboard, while others use the mouse for direct actions. The grid contains a column, that shows a long description and a button to edit that description in a dialog. This column is not an editable column.

When using tab to move through the grid, the tabs are ignoring any non editable cell and directly focus the next editable cell, which is fine under normal circumstances, but in our case that means, that the user has to "exit" the edit mode, use the arrow keys to move to the description column and then click the button, using space.

We tried using an edit column, but that did not work very well - the edit column is simply not made to contain or display buttons to interact with.

Describe the solution you'd like

There should be a setting, that allows a non editable column to be marked as "traversable via the tab key", so that users can tab through while editing and such columns will also be focused as if the user would use the arrow keys with an inactive editor.

rolfsmeds commented 2 years ago

Rather than flagging non-editable columns as focusable, I think it would be better to simply make any focusable element in a cell focusable the same way as editable cells, when the grid-pro is in edit mode.