Crate a11y

Crate a11y 

Source
Expand description

Reusable accessibility primitives

This crate provides accessibility integration for the engine. It exposes the AccessibilityPlugin. This plugin integrates AccessKit, a Rust crate providing OS-agnostic accessibility primitives, with Bevy’s ECS.

§Some notes on utility

While this crate defines useful types for accessibility, it does not actually power accessibility features in Bevy.

Instead, it helps other interfaces coordinate their approach to accessibility. Binary authors should add the AccessibilityPlugin, while library maintainers may use the AccessibilityRequested and ManageAccessibilityUpdates resources.

The AccessibilityNode component is useful in both cases. It helps describe an entity in terms of its accessibility factors through an AccessKit “node”.

Typical UI concepts, like buttons, checkboxes, and textboxes, are easily described by this component, though, technically, it can represent any kind of Bevy Entity.

§This crate no longer re-exports AccessKit

As of Bevy version 0.15, the accesskit crate is no longer re-exported from this crate.1 If you need to use AccessKit yourself, you’ll have to add it as a separate dependency in your project’s Cargo.toml.

Make sure to use the same version of the accesskit crate as Bevy. Otherwise, you may experience errors similar to: “Perhaps two different versions of crate accesskit are being used?”


  1. Some users were confused about AccessKit’s Node type, sometimes thinking it was Bevy UI’s primary way to define nodes!

    For this reason, its re-export was removed by default. Users who need its types can instead manually depend on the accesskit crate. 

Structs§

AccessibilityNode
Represents an entity to AccessKit through an accesskit::Node.
AccessibilityPlugin
Plugin managing integration with accessibility APIs.
AccessibilityRequested
Tracks whether an assistive technology has requested accessibility information.
ActionRequest
Wrapper struct for accesskit::ActionRequest.
ManageAccessibilityUpdates
Determines whether Bevy’s ECS updates the accessibility tree.

Enums§

AccessibilitySystems
A system set relating to accessibility.

Type Aliases§

AccessibilitySystemDeprecated
Deprecated alias for AccessibilitySystems.