Focus / Blur Test: Input [button] Elements

This page provides several tests to illustrate how a browser handles the focus and blur events for <input> elements with type=button. Each test in the grid below has uniquely defined properties. The first test is the default element with no tabindex defined. Each subsequent test specifies a value for tabindex, with the last one being an undefined (i.e. invalid) value.

onfocus and onblur event handlers have been bound to each of the test case controls. If triggered, an event handler will log the event in the Test Results box to the right of the test grid. The event handlers do not consume the event (i.e. they allow propagation). This allows the test to record the event but not affect the browser's default behavior.

The reset buttons will clear the Test Results.

Test Properties  
1  
2 tabindex = "0"
3 tabindex = "-1"
4 tabindex = ""
Test Results

Previously Found Results

Browser OS Element Properties Test Results Notes
focus blur visual focus visual blur
 

HTML Source Code

Show HTML Source Code: input-button.inc

Javascript Source Code

Show Javascript Source Code: input-button.js

CSS Source Code

Show CSS Source Code: focus.css

W3C Validation of HTML5