IE11 and Chrome move focus to the body if the CSS display property of the the currently focused element is set to 'none'.

This behavior is correct since elements that have focus should not lose their visibility while they have focus. This would conflict with the Best Practice Ensure keyboard focus is indicated visually.


show hide

lorem ipsum dolar ...

Steps to Reproduce

  1. Open this page in Chrome
  2. Open the console in Chrome Devtools
  3. TAB to the Show/Hide button above
  4. Activate the Show/Hide button using the ENTER key
  5. Watch the console for output and read the alert dialogs that contain messaging regarding the currently focused element