Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Scene accessibility

A scene's visual arrangement is not necessarily a useful reading order. Use the scene accessibility API to name meaningful items, group them logically, and control off-screen enumeration.

Minimal example

For a small scene whose items should remain enumerable outside the viewport:

use teksilo_scene::{A11yOffScreenMode, Scene, SceneView};

fn main() {
    let scene = Scene::new();
    let _view = SceneView::new(scene)
        .a11y_off_screen_mode(A11yOffScreenMode::AllItems);
}

Populate the scene as shown in the scene guide. Test this policy with representative data before applying it to a large scene.

Common operations

TaskAPI or policy
Limit off-screen enumerationA11yOffScreenMode
Use visual structure as the defaultA11yMode::Cooperative
Supply a separate logical structureA11yMode::StrictlyParallel
Group related itemsA11yGroup and logical parent relationships
Expose relationshipsScene accessibility relation APIs
Announce relevant changesLive-region settings on logical nodes
Label or adjust a widgetAccessibility overrides

ViewportPlusN { n: 1 } is the default off-screen policy. ViewportOnly limits enumeration to the viewport. AllItems keeps the complete scene available and can increase the number of live widgets and accessibility nodes.

Visibility and focus

Retention controls which heavyweight widgets stay alive. Accessibility policy controls which items are enumerated. A retained widget outside the accessibility region can remain alive without appearing in the accessibility tree.

Focus, pointer capture, and active drags can keep a card live outside the usual retention region. Check the resulting keyboard order and screen-reader behavior when changing retention or enumeration settings.

Constraints

  • Decorative geometry should not create unexplained focus targets.
  • Avoid announcing every pointer sample or every paint update. Announce semantic changes that help the user understand the result.
  • Provide keyboard operations for actions exposed through dragging or magnets.
  • Logical groups and relations need stable targets after removal or replacement.
  • Framework nodes and actions do not establish application accessibility. Test representative scenes with keyboard navigation and target screen readers.

Reference

Engineering reference

Implementation details and review history are retained in the repository.