legos/region
Values
pub fn announce() -> @internal Attribute(@internal Aligned, msg)
Screen readers will announce changes to this element politely, waiting for other announcements to finish
pub fn announce_urgently() -> @internal Attribute(
@internal Aligned,
msg,
)
Screen readers will announce changes to this element urgently, potentially interrupting other announcements
pub fn aside() -> @internal Attribute(@internal Aligned, msg)
Mark an element as an aside/complementary content
pub fn description(
desc: String,
) -> @internal Attribute(@internal Aligned, msg)
Adds an aria-label for accessibility software to identify otherwise unlabeled elements.
Common use case: labeling buttons that only have an icon.
pub fn footer() -> @internal Attribute(@internal Aligned, msg)
Mark an element as a footer/content info
pub fn heading(
level: Int,
) -> @internal Attribute(@internal Aligned, msg)
Mark an element as a heading with the specified level (h1, h2, etc.) This is smart enough to not conflict with existing nodes.
For example:
link([region.heading(1)], LinkConfig(url: "http://fruits.com", label: text("Best site ever")))
will generate:
<a href="http://fruits.com">
<h1>Best site ever</h1>
</a>
pub fn main_content() -> @internal Attribute(
@internal Aligned,
msg,
)
Mark an element as the main content area
pub fn navigation() -> @internal Attribute(@internal Aligned, msg)
Mark an element as navigation