Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <h1>Edge-Case <code>&lt;label tabindex=&quot;0&quot;&gt;</code></h1>
  <p>Firefox properly forwards focus to the input element when clicking on the label. However when tabbing through the document, the label element gets focus itself.</p>
  
  <p><input value="first"></p>
  <p><label tabindex="0" for="target">label</label><input id="target" value="target"></p>
  <p><input value="last"></p>
  
</body>
</html>
 
:focus {
  outline: 2px solid red;
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers