bevy/crates/bevy_ui/src
Nolan Darilek 73e0ac26ca
Various accessibility API updates. (#9989)
# Objective

`bevy_a11y` was impossible to integrate into some third-party projects
in part because it insisted on managing the accessibility tree on its
own.

## Solution

The changes in this PR were necessary to get `bevy_egui` working with
Bevy's AccessKit integration. They were tested on a fork of 0.11,
developed against `bevy_egui`, then ported to main and tested against
the `ui` example.

## Changelog

### Changed

* Add `bevy_a11y::ManageAccessibilityUpdates` to indicate whether the
ECS should manage accessibility tree updates.
* Add getter/setter to `bevy_a11y::AccessibilityRequested`.
* Add `bevy_a11y::AccessibilitySystem` `SystemSet` for ordering relative
to accessibility tree updates.
* Upgrade `accesskit` to v0.12.0.

### Fixed

* Correctly set initial accessibility focus to new windows on creation.

## Migration Guide

### Change direct accesses of `AccessibilityRequested` to use
`AccessibilityRequested.::get()`/`AccessibilityRequested::set()`

#### Before

```
use std::sync::atomic::Ordering;

// To access
accessibility_requested.load(Ordering::SeqCst)
// To update
accessibility_requested.store(true, Ordering::SeqCst);
```

#### After

```
// To access
accessibility_requested.get()
// To update
accessibility_requested.set(true);
```

---------

Co-authored-by: StaffEngineer <111751109+StaffEngineer@users.noreply.github.com>
2023-10-02 21:22:52 +00:00
..
layout Store both the rounded and unrounded node size in Node (#9923) 2023-09-28 22:42:13 +00:00
render Use EntityHashMap<Entity, T> for render world entity storage for better performance (#9903) 2023-09-27 08:28:28 +00:00
widget Store both the rounded and unrounded node size in Node (#9923) 2023-09-28 22:42:13 +00:00
accessibility.rs Various accessibility API updates. (#9989) 2023-10-02 21:22:52 +00:00
camera_config.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
focus.rs Fix the clippy::explicit_iter_loop lint (#9834) 2023-09-19 03:35:22 +00:00
geometry.rs Derive Serialize and Deserialize for UiRect (#9820) 2023-09-15 19:51:57 +00:00
lib.rs register TextLayoutInfo and TextFlags type. (#9919) 2023-09-25 18:59:29 +00:00
measurement.rs Change the default for the measure_func field of ContentSize to None. (#9346) 2023-08-07 23:06:40 +00:00
node_bundles.rs Add link to Text2dBundle in TextBundle docs. (#9900) 2023-09-25 20:33:42 +00:00
stack.rs Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
ui_node.rs Fix typos (#9965) 2023-09-29 12:26:41 +00:00
update.rs Do not panic on non-UI child of UI entity (#9621) 2023-08-29 10:49:40 +00:00