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

Select with Tab Key #85

Open
sweeperq opened this issue Oct 26, 2015 · 5 comments
Open

Select with Tab Key #85

sweeperq opened this issue Oct 26, 2015 · 5 comments

Comments

@sweeperq
Copy link

Love the graphical aspect of the toggles. However, it seems that the toggles are no longer selectable via a Tab press. It's not just that the order of tabindex is messed up; you can't even get to them without a pointing device.

@JamieReid77
Copy link

$toggleHandle at line 55 needs to be a <button>, not a <span>.

Pull request #107 attempts to resolve this, however it fails when a tabindex is manually declared on elements as the tabindex is not passed through to $toggleHandle.

I'm going to create a new pull request that resolves this shortly.

@Nfinished
Copy link

@jamiedavidreid eta? I'm working on aria support and I'd like to include your changes.

@pvagner
Copy link

pvagner commented Jul 7, 2016

@cafune Are you still working on this or do you know if there is a way on how to make toggles this component produces better accessible with assistive technologies - screen readers?

@Nfinished
Copy link

@pvagner I switched to using this library rather than trying to jury rig this one.

@nelson6e65
Copy link

I solved by modifying and adding listener to div.toggle:

$(function() {
  var $elements;
  $elements = $("div.toggle");
  if ($elements.length > 0) {
    $elements.attr("tabindex", 0);
    $elements.keydown(function(event) {
      if (event.keyCode === 32) {
        return $(this).trigger('click');
      }
    });    
  }
});

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

5 participants