Skip to content

Update TextInput.svelte to not emit a self-closing tag on the <input> element - #2064

Closed
kylejrp wants to merge 1 commit into
StackExchange:developfrom
kylejrp:patch-1
Closed

Update TextInput.svelte to not emit a self-closing tag on the <input> element#2064
kylejrp wants to merge 1 commit into
StackExchange:developfrom
kylejrp:patch-1

Conversation

@kylejrp

@kylejrp kylejrp commented Nov 22, 2025

Copy link
Copy Markdown
Contributor

Was running some output from a Svelte component that used <TextInput/> through W3C's HTML validator and got this informational message:

image

It links to this guidance:
https://github.com/validator/validator/wiki/Markup-%C2%BB-Void-elements#trailing-slashes-in-void-element-start-tags-do-not-mark-the-start-tags-as-self-closing

TL;DR: it does nothing so we shouldn't emit it

It doesn't bother me too much personally, but it does check off a validation box 🤷

@changeset-bot

changeset-bot Bot commented Nov 22, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 73844d6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Nov 22, 2025

Copy link
Copy Markdown

‼️ Deploy request for stacks rejected.

Name Link
🔨 Latest commit 73844d6

@netlify

netlify Bot commented Nov 22, 2025

Copy link
Copy Markdown

👷 Deploy request for stacks-svelte pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 73844d6

mukunku added a commit that referenced this pull request Nov 25, 2025
mukunku added a commit that referenced this pull request Nov 25, 2025
This reverts commit 5850d2a.
@mukunku
mukunku self-requested a review November 25, 2025 17:13

@mukunku mukunku left a comment

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.

After deeper investigation, unfortunately this breaks linting because prettier requires self terminating elements and this can't be changed: prettier/prettier#5641

@kylejrp kylejrp closed this Nov 25, 2025
mukunku added a commit that referenced this pull request Dec 2, 2025
* shine changes in classic

* svelte updates

* a11y tweak

* remove webkit overrides for testing

* fix lint

* Create lemon-coins-chew.md

* add back zoom webkit fix

* implement #2064 into v3

* Revert "implement #2064 into v3"

This reverts commit 5850d2a.

* remove webkit override again

* consistent heights

* update baseline

* adjust nested inputs heights

* baseline

* Input tweaks (#2073)

* Various input sizing, layout, docs tweaks

* Fix sm, lg w-axis padding

* update baseline

* update figma link

* PR feedback

* fix tests

---------

Co-authored-by: Dan Cormier <dcormier@stackoverflow.com>
mukunku added a commit that referenced this pull request Dec 3, 2025
* shine changes in classic

* svelte updates

* a11y tweak

* remove webkit overrides for testing

* fix lint

* Create lemon-coins-chew.md

* add back zoom webkit fix

* implement #2064 into v3

* Revert "implement #2064 into v3"

This reverts commit 5850d2a.

* remove webkit override again

* consistent heights

* update baseline

* adjust nested inputs heights

* baseline

* Various input sizing, layout, docs tweaks

* Input tweaks (#2073)

* Various input sizing, layout, docs tweaks

* Fix sm, lg w-axis padding

* stacks classic and docs updates

* update baseline

* create textarea svelte component

* update figma link

* set figma and svelte links

* Create afraid-cheetahs-fetch.md

* expose textarea component

* lint

* PR feedback

* fix tests

* fix min-height

* add *new* label in navigation

* add accessibility section

* remove `optiona`l props per pr feedback

* remove superfluous wrapper div

* make min-height textarea specific

* lint

* fix tests

* remove all usages of flex--item

* set initial height of text area

---------

Co-authored-by: Dan Cormier <dancormierall@gmail.com>
Co-authored-by: Dan Cormier <dcormier@stackoverflow.com>
mukunku added a commit that referenced this pull request Dec 3, 2025
* shine changes in classic

* svelte updates

* a11y tweak

* remove webkit overrides for testing

* fix lint

* Create lemon-coins-chew.md

* add back zoom webkit fix

* implement #2064 into v3

* Revert "implement #2064 into v3"

This reverts commit 5850d2a.

* remove webkit override again

* consistent heights

* update baseline

* adjust nested inputs heights

* baseline

* Various input sizing, layout, docs tweaks

* Input tweaks (#2073)

* Various input sizing, layout, docs tweaks

* Fix sm, lg w-axis padding

* stacks classic and docs updates

* update baseline

* create textarea svelte component

* update figma link

* set figma and svelte links

* Create afraid-cheetahs-fetch.md

* expose textarea component

* lint

* PR feedback

* fix tests

* fix min-height

* add *new* label in navigation

* add accessibility section

* remove `optiona`l props per pr feedback

* remove superfluous wrapper div

* make min-height textarea specific

* lint

* fix tests

* remove all usages of flex--item

* upgrade textinput & textarea to Svelte 5 style

* lint

* fix lint

* Create dirty-snails-obey.md

* upgrade migration guide

* fix textarea tests

* re-lint

* move snippet type declarations to the top

* lint

---------

Co-authored-by: Dan Cormier <dancormierall@gmail.com>
Co-authored-by: Dan Cormier <dcormier@stackoverflow.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants