Expand description
The accessibility of a RavenRS business application, so that every application made with
ravenrs-app reaches screen readers and the keyboard with nothing written for them.
AccessibleTextsays what a field or an action is called and what is said after it, from the model: the caption, unless the declaration or the model says otherwise.Announcersays what changed, such as a record kept or deleted, through aLiveRegion.AccessWordsare the words of those announcements, by key, in each language.Auditwalks an application with no window and says what keeps someone out: a control with no name, focus that is held, contrast too low on its themes, two commands on the same keys. A test of any example calls it.
use ravenrs_app_a11y::{AccessibleText, Audit};
use ravenrs_app::{FieldInfo, FieldKind};
let until = FieldInfo::new("until", FieldKind::Date).caption("Até").accessible_name("Fim do período");
assert_eq!(AccessibleText::of_field(&until, None, "Até").name, "Fim do período");
let mut ui = ravenrs_widgets::Ui::new(ravenrs_widgets::Button::new("Salvar"), ravenrs_style::Theme::raven_light());
Audit::new().screen(&mut ui, "início").assert_clean();Re-exports§
pub use words::AccessWords;
Modules§
- words
- What screen readers hear from the framework itself, in each language.
Structs§
- Accessible
Text - The name and the description screen readers get for a field or an action.
- Announcement
- One thing said to screen readers.
- Announcer
- Where an application says what changed. A handle: clones say it in the same place.
- Audit
- How to walk an application, and what to look at.
- Finding
- A problem, and where it was found.
- Live
Region - What an
Announcersays, as a node of the accessibility tree and nothing on the screen. - Report
- What an audit found, and where it looked.
Enums§
Constants§
- TEXT_
CONTRAST - The least contrast for text, as WCAG asks of normal text (AA).
- UI_
CONTRAST - The least contrast for what is not text but has to be seen, such as the focus ring (AA).
Functions§
- check_
focus - Presses Tab across the screen and says whether the focus moves and reaches every control. The focus is left where the last press put it.
- check_
shortcuts - Commands of the latest frame that answer to the same keys.
- check_
theme - The pairs of colors of
themethat are too close to read. - check_
tree - What is wrong with the names and ids of a tree.
- is_
control - Roles that are operated, so they must say what they are.