Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change BlockLabel element to use <label> #5864

Merged
merged 11 commits into from Oct 12, 2023
6 changes: 6 additions & 0 deletions .changeset/salty-donuts-hear.md
@@ -0,0 +1,6 @@
---
"@gradio/atoms": minor
"gradio": minor
---

feat:Change `BlockLabel` element to use `<label>`
17 changes: 17 additions & 0 deletions js/atoms/src/BlockLabel.svelte
Expand Up @@ -17,7 +17,24 @@
<Icon />
</span>


<label
class:hide={!show_label}
class:sr-only={!show_label}
class:float
class:hide-label={disable}
data-testid="block-label"
>
<span>
<Icon />
</span>
{label}
</label>

<style>
label {
display: inline-flex;
aileenvl marked this conversation as resolved.
Show resolved Hide resolved

</div>

<style>
Expand Down