Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions renderers/lit/src/0.8/ui/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,12 @@ export class Checkbox extends Root {

this.#setBoundValue(evt.target.checked);
}}
id="data"
id="${this.id}-input"
name=${this.id}
type="checkbox"
.checked=${value}
/>
<label class=${classMap(this.theme.components.CheckBox.label)} for="data"
<label class=${classMap(this.theme.components.CheckBox.label)} for="${this.id}-input"
>${extractStringValue(
this.label,
this.component,
Expand Down
6 changes: 3 additions & 3 deletions renderers/lit/src/0.8/ui/datetime-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class DateTimeInput extends Root {
class=${classMap(this.theme.components.DateTimeInput.container)}
>
<label
for="data"
for="${this.id}-input"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how are you setting this id property? Is it directly in the DOM, or does it come from the agent?

class=${classMap(this.theme.components.DateTimeInput.label)}
>${this.#getPlaceholderText()}</label
>
Expand All @@ -104,8 +104,8 @@ export class DateTimeInput extends Root {

this.#setBoundValue(evt.target.value);
}}
id="data"
name="data"
id="${this.id}-input"
name=${this.id}
.value=${this.#formatInputValue(value)}
.placeholder=${this.#getPlaceholderText()}
.type=${this.#getInputType()}
Expand Down
6 changes: 3 additions & 3 deletions renderers/lit/src/0.8/ui/slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class Slider extends Root {
class=${classMap(this.theme.components.Slider.container)}
>
${this.label
? html`<label class=${classMap(this.theme.components.Slider.label)} for="data">
? html`<label class=${classMap(this.theme.components.Slider.label)} for="${this.id}-input">
${extractStringValue(
this.label,
this.component,
Expand All @@ -109,8 +109,8 @@ export class Slider extends Root {

this.#setBoundValue(evt.target.value);
}}
id="data"
name="data"
id="${this.id}-input"
name=${this.id}
.value=${value}
type="range"
min=${this.minValue ?? "0"}
Expand Down
6 changes: 3 additions & 3 deletions renderers/lit/src/0.8/ui/text-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class TextField extends Root {
${label && label !== ""
? html`<label
class=${classMap(this.theme.components.TextField.label)}
for="data"
for="${this.id}-input"
>${label}</label
>`
: nothing}
Expand All @@ -126,8 +126,8 @@ export class TextField extends Root {

this.#setBoundValue(evt.target.value);
}}
name="data"
id="data"
name=${this.id}
id="${this.id}-input"
.value=${value}
.placeholder=${"Please enter a value"}
pattern=${this.validationRegexp || nothing}
Expand Down
Loading