Expand description
Accessibility helpers: names for custom widgets, and an announcer whose messages screen readers read out (an AccessKit live region).
use egui_pop_core::a11y::{self, Politeness};
let ctx = egui::Context::default();
a11y::announce(&ctx, "Saved", Politeness::Polite);
assert_eq!(a11y::announcements(&ctx)[0].text, "Saved");Structs§
- Announcement
- One message.
Enums§
- Politeness
- How urgently a message is read.
Constants§
- KEPT
- How many announcements are kept.
Functions§
- announce
- Queues a message for screen readers.
- announcements
- The messages kept, oldest first.
- input
- Names an input brick (a text input, a number input, a slider, a
descriptor’s drop-down) by its own
label, so assistive technologies read a name whether or not its caller also points it at a label drawn beside it (labelled_by), and records it as drawn this pass, its nodeid, for the check that every one has a name (inputs). - inputs
- The input bricks drawn in the last complete pass, by node id: what a test checks has a name of its own.
- live_
regions - Draws the live regions (one polite, one assertive) holding the latest messages. Invisible; call it once per pass, anywhere (the app shell does). Every other message of a region ends with an invisible no-break space, so the same text announced twice in a row changes the region and is read twice.
- name
- Gives a custom widget its role and accessible name.