Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various accessibility API updates. #9989

Merged
merged 6 commits into from
Oct 2, 2023

Conversation

ndarilek
Copy link
Contributor

@ndarilek ndarilek commented Oct 1, 2023

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);

* Add `bevy_a11y::ManageAccessibilityUpdates` to indicate whether the ECS should manage tree updates.
* Add getter/setter to `bevy_a11y::AccessibilityRequested`.
* Add `bevy_a11y::AccessibilitySystem` `SystemSet` for ordering relative to accessibility tree updates.
* Correctly set initial focus to new windows on creation.
@alice-i-cecile alice-i-cecile added A-Accessibility A problem that prevents users with disabilities from using Bevy A-UI Graphical user interfaces, styles, layouts, and widgets P-High This is particularly urgent, and deserves immediate attention labels Oct 2, 2023
@alice-i-cecile alice-i-cecile added this to the 0.12 milestone Oct 2, 2023
@viridia
Copy link
Contributor

viridia commented Oct 2, 2023

One of the checks failed, looks like a problem with the Cargo.lock file, has a duplicate entry. Since the PR doesn't include Cargo.lock you be able to re-run the tests or rebase.

@ndarilek
Copy link
Contributor Author

ndarilek commented Oct 2, 2023

Interesting, thanks, any idea how a duplicate entry got in there? Didn't even know that was possible.

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine :) Suggestions are non-blocking.

ndarilek and others added 3 commits October 2, 2023 07:30
Co-authored-by: StaffEngineer <111751109+StaffEngineer@users.noreply.github.com>
@ndarilek
Copy link
Contributor Author

ndarilek commented Oct 2, 2023

I'm not clear where the conflict is, I merged main and everything went fine. Is this a github bug or am I genuinely missing something?

@ndarilek
Copy link
Contributor Author

ndarilek commented Oct 2, 2023

OK, maybe that got it, just spotted the link to resolve.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Oct 2, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 2, 2023
Merged via the queue into bevyengine:main with commit 73e0ac2 Oct 2, 2023
25 of 26 checks passed
ameknite pushed a commit to ameknite/bevy that referenced this pull request Oct 3, 2023
# 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>
@cart cart mentioned this pull request Oct 13, 2023
43 tasks
regnarock pushed a commit to regnarock/bevy that referenced this pull request Oct 13, 2023
# 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>
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Accessibility A problem that prevents users with disabilities from using Bevy A-UI Graphical user interfaces, styles, layouts, and widgets P-High This is particularly urgent, and deserves immediate attention S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants