Skip to content

Instantly share code, notes, and snippets.

  • Go to http://todomvc.com/ in IE10 or 11
  • using f12 tools, add a rule that says :focus { border: 2px solid green; }
  • using the mouse click on various bits of text/empty space - you will see elements that are not keyboard focusable get the outline
  • press tab and you will see that that thing really did 'have the focus' (you can also do document.activeElement to verify)

I cannot see why/what circumstances this happens, when it does setting tabindex=-1 doesn't seem to impact.

I'm concerned that these are receiving focus because the focus indicatoractually seems to be "doing the right thing" from an a11y standpoint, so selectively styling it or not doesn't seem right. To me it seems that the real 'problem' is that it got focus in the first place - other browsers don't seem to do this.