From 5b736069f51ffb593c12b0e6a62d0ad1e87e7473 Mon Sep 17 00:00:00 2001 From: Joe Schafer Date: Wed, 21 May 2025 17:32:47 -0700 Subject: [PATCH 1/2] fix: allow attributes on the title element The spec states the title element supports global attributes. https://html.spec.whatwg.org/#the-title-element Reverts the title attribute validation introduced in #1721. Fixes #5198. --- .changeset/selfish-wasps-agree.md | 5 +++++ .../docs/98-reference/.generated/compile-errors.md | 6 ------ .../svelte/messages/compile-errors/template.md | 4 ---- packages/svelte/src/compiler/errors.js | 11 +---------- .../phases/2-analyze/visitors/TitleElement.js | 4 ---- .../samples/title-no-attributes/errors.json | 14 -------------- 6 files changed, 6 insertions(+), 38 deletions(-) create mode 100644 .changeset/selfish-wasps-agree.md delete mode 100644 packages/svelte/tests/validator/samples/title-no-attributes/errors.json diff --git a/.changeset/selfish-wasps-agree.md b/.changeset/selfish-wasps-agree.md new file mode 100644 index 000000000000..3238e5c1e17e --- /dev/null +++ b/.changeset/selfish-wasps-agree.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +Allow attributes on the title element. diff --git a/documentation/docs/98-reference/.generated/compile-errors.md b/documentation/docs/98-reference/.generated/compile-errors.md index db848a0299ee..76ad8de7fb53 100644 --- a/documentation/docs/98-reference/.generated/compile-errors.md +++ b/documentation/docs/98-reference/.generated/compile-errors.md @@ -1082,12 +1082,6 @@ Expected a valid element or component name. Components must have a valid variabl A `