Skip to content

Instantly share code, notes, and snippets.

@cvrebert cvrebert/survey.md
Last active Sep 27, 2019

Embed
What would you like to do?
Click and focus behavior across browsers & OSes

Test apparatus: http://jsfiddle.net/hRub4/

(Windows = Windows 8.1 desktop)

  • Windows Chrome 39
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click and via keyboard tabbing
  • Windows Firefox 30.0
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click and via keyboard tabbing
  • Windows Internet Explorer 11
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click and via keyboard tabbing
  • Opera 12.12 on Windows 7
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click; can NOT be focused via keyboard tabbing (even with tabindex)
  • Opera 12.16 on Mac OS X
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click; requires tabindex to be focused via keyboard tabbing
  • Opera 12.16 on Linux
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click; can NOT be focused via keyboard tabbing (even with tabindex)
  • Mac OS X Chrome 39
    • Button focuses on click
    • Anchor focuses on click and via keyboard tabbing
  • Mac OS X Firefox 30.0
    • Button does NOT focus on click (even with tabindex); can be focused via keyboard tabbing
    • Anchor focuses on click; can NOT be focused via keyboard tabbing (even with tabindex)
      • To get keyboard tabbing to work, the user must change System/Firefox preferences (see http://stackoverflow.com/a/11713537); the webpage author can't do anything about it (barring the use of hacky JavaScript)
  • Mac OS X Safari 7.0.5
    • Button
      • can be focused by Option+Tab-ing
      • can NOT be focused by clicking (even with tabindex)
    • Anchor can be focused by:
      • Option+Tab-ing
      • Clicking, but ONLY when the anchor has a tabindex
  • iOS Safari 7.0.4
    • Button can NOT be focused via tapping (even with tabindex)
    • Anchor can be focused via tapping, but ONLY when the anchor has a tabindex

This data is now mostly documented on MDN:

@JamesJosephFinn

This comment has been minimized.

Copy link

commented Nov 11, 2015

OS X 10.11.1, Safari 9.0.1: Button can NOT be focused by clicking or tabbing (even with tabindex)

@Narretz

This comment has been minimized.

Copy link

commented Jan 13, 2016

Awesome list. Would be cool to have links fo bug reports for the offending platforms.

@niklaskorz

This comment has been minimized.

Copy link

commented Dec 11, 2017

Ran across the button focusing issue on Firefox 57 on macOS 13 today, thanks for the list.

@schultbr

This comment has been minimized.

Copy link

commented Jan 30, 2018

input type radio is effected similarly to buttons on Firefox 58 in OSX - clicking does not focus, but tabbing does.

@hiyangguo

This comment has been minimized.

Copy link

commented Aug 6, 2018

OS X 10.13.5,Safari 11.1.1 (13605.2.8): Button can't focused by tabbing or clicking (even with [tabindex])

@mali891

This comment has been minimized.

Copy link

commented May 16, 2019

OS X 10.13.6, Safari 11.1.2 (13605.3.8): Button can't focused by tabbing or clicking (even with [tabindex])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.