Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons are not responsive when accessed by tab. #91

Open
MuellerMatthew opened this issue Apr 28, 2015 · 4 comments
Open

Buttons are not responsive when accessed by tab. #91

MuellerMatthew opened this issue Apr 28, 2015 · 4 comments

Comments

@MuellerMatthew
Copy link

When a user tabs to the buttons for TableTools, and presses 'enter' the only button which responds is the print preview button. All of the other buttons are non-responsive as the flash plugin is actually activated by a user click on a transparent layer above the button. This means that all of the TableTools are not accessible.

There are two possible ways to fix this, and I am not sure which is the better option. We can either move the tab stops so that the transparent layer is actually receiving the focus when users tab by editing the tab index, or add a default action to the buttons which also trigger the flash plugin.

@DataTables
Copy link
Collaborator

This unfortunately is a Flash security restriction which there is no way around that I am aware of :-(. The Flash movie has to have the "focus" in order to be able to call the API events such as copy to clipboard and save to local file. Those actions must also be triggered by a user triggered event - in the case of a click we can do both. For tabbing we first need to give the Flash movie focus, which I'm not aware of a way of doing with a keyboard.

Some details here: http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes.html#head31 .

It is worth noting that TableTools is soon going to be replaced with a new extension called Buttons which is currently in development. It will have Flash options to match TableTools, but I plan also to add options for modern browsers to save files locally. Unfortunately there is no HTML5 API to copy to clipboard so that one is more or less stuck, other than opening a textarea with the table information in it, preselected for the end user to copy manually (which will be an option as well).

So I'm afraid this is unlikely to fixed in TableTools unless someone wants to send a pull request.

@MuellerMatthew
Copy link
Author

Ok, I was unaware of the flash limitations. As a temporary bandaid for this issue, we should probably just make the buttons inaccessible by tab by setting their tabindex to -1 so they just get skipped over.

@DataTables
Copy link
Collaborator

Sounds like a reasonable thing to do - thanks for the suggestion. I'll add that into the next bug fix release of TableTools.

@924060929
Copy link

Hi MuellerMatthew!
I just fixed this issue.
When you click the tab, the related div will show.At the time you can re-render the buttons of table tools.Just invoke the function 'fnResizeButtons' of TableTools's instance.
First, invoke the static method and get the instance: var tableTools = TableTools.fnGetInstance( 'table_id' );
Seconds, resize the buttons: tableTools.fnResizeButtons();
Then the buttons active!

This is the link to Table Tools API: http://datatables.net/extensions/tabletools/api#Instance-methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants