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

Add accessibility to ProgressBar and Spinner #4139

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

DataTriny
Copy link
Contributor

  • Introduces WidgetType::ProgressIndicator and maps it to the corresponding AccessKit role.
  • A Spinner is now exposed as a widget indicating a progress for which a completion state is not known.
  • On the other hand, a ProgressBar reports a completion state and can possibly be labeled. Note that a label is not used if not explicitly asked by the user, as it would be redundant information. Assistive technologies prefer the numerical value so they can, for instance, emit beeps of which the frequency rise as the completion state increase. I had to call floor on the progression as it seems all the ATs I tested would round the value, hence reporting something different than what is displayed on the label.

@DataTriny DataTriny mentioned this pull request Mar 5, 2024
@emilk emilk added the accessibility More accessible to e.g. the visually impaired label Mar 8, 2024
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Thanks!

@emilk emilk added the egui label Mar 8, 2024
@emilk emilk changed the title Make ProgressBar and Spinner accessible Add accessibility for ProgressBar and Spinner Mar 8, 2024
@emilk emilk changed the title Add accessibility for ProgressBar and Spinner Add accessibility to ProgressBar and Spinner Mar 8, 2024
@emilk emilk merged commit 76411b5 into emilk:master Mar 8, 2024
19 of 21 checks passed
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
- Introduces `WidgetType::ProgressIndicator` and maps it to the
corresponding AccessKit role.
- A `Spinner` is now exposed as a widget indicating a progress for which
a completion state is not known.
- On the other hand, a `ProgressBar` reports a completion state and can
possibly be labeled. Note that a label is not used if not explicitly
asked by the user, as it would be redundant information. Assistive
technologies prefer the numerical value so they can, for instance, emit
beeps of which the frequency rise as the completion state increase. I
had to call `floor` on the progression as it seems all the ATs I tested
would round the value, hence reporting something different than what is
displayed on the label.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility More accessible to e.g. the visually impaired egui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants