Skip to main content

Crate leptos_aria_utils

Crate leptos_aria_utils 

Source

Structs§

FieldProps
The accessibility props to spread onto the labeled field element.
GlobalListeners
A set of event listeners registered on targets outside the rendered tree, alive for the lifetime of an interaction.
LabelProps
The props for the label element, if the field has a label.
LinkTarget
How a link click should navigate.
Map
web_sys::Element is not hashable, which means it cannot be used as a key in a std::collections::HashMap. This is a lightweight wrapper around the JavaScript Map object that allows using elements as keys.
Set
A wrapper around the JavaScript Set object with typed members.
UseLabelProps
The props accepted by use_label.
UseLabelResult
The result of use_label: props for the label and the labeled field.
UseLabelsProps
The props accepted by use_labels: either a visible label or the aria labeling attributes, never both.

Enums§

FocusableElement
An element that can receive focus: either an HTMLElement or an SVGElement.
InteractionModality
How the user is currently interacting with the page.
LabelElementType
Whether a <label for> element can label the field.

Traits§

ToFocusableElement

Functions§

focus_safely
Focus an element while avoiding undesired side effects such as page scrolling and screen reader issues with CSS transitions.
focus_without_scrolling
A polyfill for element.focus({preventScroll: true}).
handle_link_click
The on_click behavior for a custom link element: plain clicks navigate, modifier clicks keep the browser default.
interaction_modality
The current interaction modality, as detected from global input events.
is_anchor_with_href
Whether an anchor element has an href making it a link.
is_android
is_apple_device
is_chrome
is_focus_visible
Whether focus should be visible for the current interaction modality.
is_focusable
Whether an element can receive keyboard focus.
is_ios
is_ipad
is_iphone
is_mac
is_tabbable
Whether an element can be reached with sequential Tab navigation.
is_virtual_click
Keyboards, Assistive Technologies, and element.click() all produce a “virtual” click event. This is a method of inferring such clicks: every browser except IE 11 only sets a zero value of “detail” for click events that are “virtual”, and only a genuine pointer-driven click carries a pointerType.
is_virtual_pointer_event
is_webkit
merge_class
The reactive class attribute for a component root: its built-in base class followed by the caller’s classes.
open_link
Open a link, handling the modifier-key behaviors browsers apply to plain anchors: ctrl/cmd clicks open a new tab, shift clicks a new window, and alt clicks download — all left to the default behavior.
run_after_transition
Perform an action after all CSS transitions have finished on the page.
use_id
Generate a unique id for labeling and description wiring.
use_label
Provides the accessibility wiring between a visible label and a field.
use_labels
Provides labeling wiring where a visible label replaces aria-label.