rusty_a11y/lib.rs
1#![no_std]
2#![cfg_attr(docsrs, feature(doc_cfg))]
3
4//! Accessibility helpers for UI chrome -- ARIA HTML string builders.
5//!
6//! Sibling of [`rusty_symbols`](https://crates.io/crates/rusty_symbols) and
7//! [`rusty_tokens`](https://crates.io/crates/rusty_tokens).
8//! Emits small HTML snippets with `role` / `aria-*` only -- no DOM crate, no JS.
9//! Requires `alloc` (provided by `std` in normal apps).
10//!
11//! By default installs [`rusty_alloc`](https://github.com/Remade-With-Rust/rusty_alloc)
12//! via [`rusty_alloc_default`](https://crates.io/crates/rusty_alloc_default)
13//! (opt out with `default-features = false`).
14
15/// Whether this build pulled in the default `rusty_alloc` install.
16pub const fn rusty_alloc_enabled() -> bool {
17 cfg!(feature = "rusty-alloc")
18}
19
20/// Whether the hardened `secure` allocator profile is compiled in.
21pub const fn secure_allocator_enabled() -> bool {
22 cfg!(feature = "secure")
23}
24
25pub mod label;
26pub mod live;
27pub mod status;