Skip to content

Tabbing to a selectmenu doesn't work in Firefox or Safari on Mac #276

Description

@trptcolin

In an implementation we recently inherited, and also in every other selectmenu implementation I've found using <select> tags, the select-replacing elements are not included in the tab order on the latest versions of FF and Safari on Mac. Chrome works fine, and it's not the usual problem where I need to set a system-wide preference to allow focus on any element, since that's already set.

Here are a few examples where I see this behavior:

http://jsfiddle.net/fnagel/GXtpC/
http://view.jqueryui.com/selectmenu/demos/selectmenu/default.html

Interestingly, the radio-button replacements allow tabbing to focus on this example, but not the select menu replacements: http://www.broadbandmap.gov/about-provider

Any ideas whether there's a workaround, or if we're just out of luck here?

Activity

  1. fnagel commented on Oct 25, 2012

    @fnagel
    Owner

    Does this problem only occur on Mac? It seems to work on Windows machines. If so, I would need some more time to investigate in this as I do not own a Mac.

    Please note: your second demo link is outdated.

  2. trptcolin commented on Oct 25, 2012

    @trptcolin
    Author

    Yes, only on Mac. Here's what I was seeing:

    Javascript-replaced dropdowns:

    • Tabbing doesn't work on Safari on Mac, regardless of app-specific settings.
    • Tabbing takes an [obscure] app-specific setting to get working on Firefox on Mac.

    Native controls:

    • Tabbing takes an app-specific setting to get working on Safari on every platform.
  3. fnagel commented on Oct 25, 2012

    @fnagel
    Owner

    Ok, I will take a look asap. Any ideas are welcome!

  4. pshoeg commented on Oct 29, 2012

    @pshoeg

    I can confirm that it doesn't work in Chrome on Mac either. However, it does work in Opera.

  5. fnagel commented on Oct 29, 2012

    @fnagel
    Owner

    Thanks for the feedback! Any idea how to fix that? I have no clue when I
    have the chance to test this...

  6. pshoeg commented on Oct 30, 2012

    @pshoeg

    No idea at all, unfortunately :(

  7. pshoeg commented on Oct 30, 2012

    @pshoeg

    I found this script: http://www.456bereastreet.com/lab/custom-select/
    It works on Mac browsers as well, maybe there's something usable there?

  8. fnagel commented on Oct 30, 2012

    @fnagel
    Owner

    This works with native selects. Wont help in our case.

  9. fnagel commented on Feb 4, 2013

    @fnagel
    Owner

    Any feedback on this issue?

  10. rmfruit commented on Apr 8, 2013

    @rmfruit

    This is an issue with the default a behavior on Mac Safari and Firefox that skips links during tab navigation. Since the drop-downs are rendered using an anchor tag they get skipped. There a setting (in Safari at least) to tell the browser to navigate to all elements on the page when you use tab, but that's not an ideal solution.

    One workaround is to capture the tab press on the previous element and manually focus() the drop down. Hardly ideal if you have tons of drop-downs and dynamically ordered forms though.

  11. fnagel commented on Apr 9, 2013

    @fnagel
    Owner

    So this is a general issue with Apples OS when dealing with links, right?
    Native selects get tabindex?

    Perhaps we could change from a to button elements like we did in the new,
    built from scratch version: #140

  12. rmfruit commented on Apr 10, 2013

    @rmfruit

    Yeah, native selects (and all other form elements) receive focus on tabbing so switching to a button would fix the issue. Where is the new, built from scratch version? (Sorry I'm new-sh to Git-land).

  13. fnagel commented on Apr 10, 2013

    @fnagel
    Owner

    Naah, thats my fault, see #140

  14. fnagel commented on May 29, 2013

    @fnagel
    Owner

    Anyone any idea how to fix this issue? Perhaps somebody could test the new selectmenu?

  15. fnagel commented on Sep 30, 2014

    @fnagel
    Owner

    Is this still a thing?

  16. glencampbell commented on Aug 26, 2015

    @glencampbell

    Going to settings > keyboard > shortcuts and turn on all controls option for full keyboard access. This then allows the likes of Firefox to tab through links, etc. Not sure whether this answers things or helps – something I came across a while ago

  17. jgeringer commented on Jul 5, 2016

    @jgeringer

    Found a fix for this. It's only broken on older versions of the selectmenu and is fixed in the latest one.

    To fix, change this line in the select menu script...
    this.newelement = $('<a />', {

    To this...
    this.newelement = $('<span />', {

    Exactly what @rmfruit was saying:
    "This is an issue with the default a behavior on Mac Safari and Firefox that skips links during tab navigation"

    So changing it from an to something else, like fixes it.

  18. fnagel commented on Jul 6, 2016

    @fnagel
    Owner

    Thans for giving feedback but there is no difference in your code snippets :-D

  19. jgeringer commented on Jul 6, 2016

    @jgeringer

    Sorry @fnagel! Part of the code was stripped out when I pasted it in, but it's there now if you see my original post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions