Opened 7 years ago

Closed 4 years ago

Last modified 4 years ago

#16538 closed defect (fixed)

[PATCH][CCLA] Dojox/grid looses focus when selecting a row with keyboard

Reported by: mikeb Owned by: dylan
Priority: undecided Milestone: 1.7.9
Component: DojoX Grid Version: 1.8.2
Keywords: Cc: bill
Blocked By: Blocking:

Description

The dojox/grid component has a slight problem with the focus logic. If there is a row that is selectable, either via a checkbox or radio button, and a user selects this row using the keyboard, the selected cell's focus is lost. This results in issues with screen readers and keyboard users.

Test page: http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/grid/tests/test_grid_selectors.html

Procedure:

  1. Click on the heading, then press TAB twice to navigate into the first cell of the first column of the first grid. (The cell with the number 1 in it.)
  2. Press SPACE key to select this entire row.

Observed behavior: The entire row is selected. However, the cell we were in is now no longer focused. Pressing TAB again focuses back on the cell, but users should not have to press the tab key again. Requiring the users to press TAB again is not intuitive and does not follow the rest of the grid TAB logic. For example, if you use the keys to select one of the headers and press SPACE to reorder the grid based on your selected header, the grid gets redrawn but focus is maintained on the header cell. I think that pressing SPACE on a header to sort the grid is analogous to pressing SPACE on a cell that selects the entire row. Focus should be maintained on the cell. You can see the discrepancy is detailed in the documentation here: here: http://dojotoolkit.org/reference-guide/1.8/dojox/grid/DataGrid.html

Sort a column With focus on a column header press the enter key to sort the column. Focus remains in the column header after the sort.
Select a row With focus on a cell in a row, press the space bar.

There have been reports that using a 1.7.X build, the focus will actually land on a completely separate page element, but I have not been able to reproduce this particular behavior.

I attached a patch that just refocuses on the cell.

Attachments (1)

dojox.grid_keyboard_focus_fix.patch (557 bytes) - added by mikeb 7 years ago.
Patch to re-focus on a cell when using keyboard to select a row in grid. Please proxy commit for Michael Billau, CCLA on file with IBM

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by mikeb

Patch to re-focus on a cell when using keyboard to select a row in grid. Please proxy commit for Michael Billau, CCLA on file with IBM

comment:1 Changed 7 years ago by mikeb

Cc: bill added

comment:2 Changed 4 years ago by dylan

Milestone: tbd1.11
Owner: changed from Evan to dylan
Status: newassigned

While dojox/grid is deprecated, we might as well land this.

comment:4 Changed 4 years ago by dylans <dylan@…>

Resolution: fixed
Status: assignedclosed

In 89551ec0bbd0d909511df31c72d6906c92aaa33e/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:5 Changed 4 years ago by dylans <dylan@…>

In 5b35a69863a9b9e03f5fa4d583310acf1466aa9d/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 4 years ago by dylans <dylan@…>

In 61cfdf544b4885e7d43aee4b468172769ed9f552/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:7 Changed 4 years ago by dylans <dylan@…>

In 78d981de32ce0909b7d3f5112edd8273e1f47f5e/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:8 Changed 4 years ago by dylans <dylan@…>

In b11d7c477713e26de2d7fc666662fca92944a026/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:9 Changed 4 years ago by dylan

Milestone: 1.111.7.9
Note: See TracTickets for help on using tickets.