You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`label`|`MaybeProp<String>`| – | The accessible label for the icon. It will be visually hidden but announced to screen readers. |
85
+
|`children`|`TypedChildren<impl IntoView + 'static>`| – | Your icon (SVG or similar). Extra attributes like `aria-hidden="true"` and `focusable="false"` are automatically applied. |
Most icons or icon systems come with no accessibility built-in. For example, the same visual **cross** icon may in fact mean **"close"** or **"delete"**.
69
-
This component lets you give meaning to icons used throughout your app.
100
+
Most icons or icon systems come with no accessibility built-in. For example, the same visual **cross** icon might mean *
101
+
*"close"** or **"delete"**. By wrapping your icon in `<AccessibleIcon::Root>` (Leptos/Yew), you provide a meaningful
102
+
label that screen readers will announce, while the icon itself is hidden from assistive technology via
103
+
`aria-hidden="true"`.
104
+
105
+
This is built with [Visually Hidden](../utilities/visually-hidden) so labels are hidden visually but still accessible to
106
+
screen readers.
107
+
108
+
## Example (Leptos)
109
+
110
+
```rust,ignore
111
+
use leptos::prelude::*;
112
+
use radix_leptos_visually_hidden::primitive as VisuallyHidden;
113
+
use radix_leptos_accessible_icon::primitive as AccessibleIcon;
0 commit comments