This is a migrated thread and some comments may be shown as answers.

Accessibility problem

2 Answers 70 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 30 May 2017, 12:12 PM

Hello,

the accessibility is in our projects an importnant point. I need to use each feature with keyboard control. For the spreadsheet I found the following documentation for keyboard access.

http://docs.telerik.com/kendo-ui/controls/data-management/spreadsheet/end-user/list-of-shortcuts

The main problem is, that when I am with the focus in the toolbar, I cant access the back/forward buttons or tabs above. And when I am tabbing into the first cell, I am caught in the table. When I reach the last cell and press tab again, it pushes me back to the first cell. How is it possible to lose the focus of the spreadsheet to continue to the other focusable items of the application. Is this a bug or am I missing a shortcut here?

2 Answers, 1 is accepted

Sort by
0
Jan
Top achievements
Rank 1
answered on 31 May 2017, 07:39 AM

I can use the following listener to add the focus to the next or previous element when pressing tab:

$(document).on('keydown', '.k-spreadsheet-view', function (e) {
  if (e.keyCode === 9) {
    if (e.shiftKey) {
      ...previousElement...focus();
    } else {
      ...nextElement...focus();
    }
    return false;
  }
  return true;
});
But I am not able to prevent the spreadsheet to focus the previous/next cell when I am using tab.
0
Ianko
Telerik team
answered on 02 Jun 2017, 08:42 AM

Hello Jan,

Indeed, Kendo Spreadsheet does not implement a utility that would enable escaping the spreadsheet view. I searched for the user reports for this demand and I was unable to find similar situations. 

I would recommend posting that as a feature request as it sounds reasonable to have such a functionality. You can suggest that idea here: http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback. That way other developers will be able to post their opinion on that. Plus, the dev team and our PM will be able to consider it for the roadmap. 

For the time being, the workaround you have should work. However, the tab key cannot be prevented and Spreadsheet will always trigger the tab action along with the logic in the custom handler. Instead, you can use a keyboard combination that is not occupied by the browser or the Spreadsheet. Like in this example:

$(document).on('keydown', '.k-spreadsheet-view', function (e) {
        if (e.keyCode === 38) { // Ctrl+Alt+Up
            if (e.ctrlKey && e.altKey) {
                $(".k-spreadsheet-quick-access-toolbar .k-button:first").focus();
                e.preventDefault()
            }
        }
 
        if (e.keyCode === 40) { // Ctrl+Alt+Down
            if (e.ctrlKey && e.altKey) {
                // Select the element down
                e.preventDefault()
            }
        }
});

Regards,

Ianko
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Spreadsheet
Asked by
Jan
Top achievements
Rank 1
Answers by
Jan
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or