Mutating the active element

This document provides a simple way to test browsers' behavior when the active element is mutated so that it isn't focusable anymore. The mutations include hiding and disabling disabling the element, as well as removing it from the DOM and removing the ability to receive focus by removing the tabindex attribute. Browser behavior can be observed for the elements <button>, <input> and <div>. At the end of the document the current active element is printed on screen for convenience.

Testing grounds

Element to mutate

Choose the type of element you want to observe the mutation on.

Method of mutation

Choose the way the element should lose the ability to receive focus.

document.activeElement: