FIG-001/ A11Y

aria treeview.

Inspect how the viewer exposes tree roles, expansion state, labelled controls, and keyboard-ready focus behavior.

  • The demo is a focused Svelte component wired to @humanspeak/svelte-json-view-lite.
  • Interactions stay local to the example so you can copy the pattern without pulling in the docs shell.
  • Viewer behavior keeps the same keyboard-ready tree semantics as the packaged component.
↩ all examples
role · treefocus · roving mode · live running source
{
    tree:{
      role:"tree",
      keyboard:[
        "ArrowUp",
        "ArrowDown",
        "ArrowLeft",
        "ArrowRight",
        "Enter",
        "Space"
      ],
      nodes:[
        {
          label:"request",
          expanded:true,
          controls:"request-panel",
          children:[
            "headers",
            "body",
            "metadata"
          ]
        },
        {
          label:"response",
          expanded:true,
          controls:"response-panel",
          children:[
            "status",
            "headers",
            "body"
          ]
        }
      ]
    },
    aria:{
      labelledBy:"json-tree-label",
      expandedState:"mirrors disclosure state",
      focus:"roving tabindex inside the viewer"
    }
}
category · a11y
sheet · sheet 01 / 01
⟳ to re-run