isosphere / yew-bootstrap

Bootstrap 5 Components for the Yew Framework
https://crates.io/crates/yew-bootstrap
MIT License
37 stars 18 forks source link

Spinner hidden text not working as documented #20

Closed Kritzefitz closed 1 year ago

Kritzefitz commented 1 year ago

The documentation of yew_bootstrap::component::Spinner says that visually hidden text in the spinner should be added as follows:

<Spinner>
  {"hidden text"}
</Spinner>

However, that example renders like this:

image

Looking at the source of the Spinner component

        html! {
            <div class={classes} role="status">
                <span class="visually-hidden">
                    {&props.text}
                </span>
                { for props.children.iter() }
            </div>
        }

it looks like the text attribute is actually rendered where the hidden text would be supposed to be rendered. But since its type is bool it can't really be used to pass any useful state either.

isosphere commented 1 year ago

Thank you for your report @Kritzefitz , I can confirm your findings.

Please check out #21 for my proposed solution and let me know if it meets your needs.

isosphere commented 1 year ago

Closed as completed! Fixed in 0.5.16.