Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>ally.style.focusWithin Example</title>
</head>
<body>
<article id="example-introduction">
  <h1><code>ally.style.focusWithin</code> Example</h1>
  <p>The ancestry of the focused element should be visible by red borders. The first and the last input are outside of the style scope - they are there to provide focusable elements to verify that the <code>ally-focus-within</code> class is properly removed.</p>
</article>
<div id="example-html">
  <main>
    <input id="before-input" type="text" value="before styled">
    <div class="example">
      <div id="first-shadow-host"></div>
      <div>
        <input id="outer-input" type="text" value="outer input">
      </div>
      <svg width="50" height="50" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <a xlink:href="#void" data-label="svg a[xlink|href]">
          <text x="10" y="20" data-label="svg a[xlink|href] text">an SVG</text>
        </a>
      </svg>
    </div>
  </main>
</div>
<script src="https://cdn.jsdelivr.net/ally.js/1.4.1/ally.min.js"></script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
rodneyrehmpro
0viewers