import TestCase from '../../TestCase'; import Fixture from '../../Fixture'; const React = window.React; const {Fragment, useRef} = React; export default function FocusCase() { const fragmentRef = useRef(null); return (
  • Click to focus the first child
  • Click to focus the last child
  • Click to blur any focus within the fragment
  • The focus method will focus the first focusable child within the fragment, skipping any unfocusable children.

    The focusLast method is the reverse, focusing the last focusable child.

    Blur will call blur on the document, only if one of the children within the fragment is the active element.

    Unfocusable div

    Unfocusable div with nested focusable button

    Unfocusable div

    ); }