penpot/frontend
Eva Marco 0fa1077b9a
🐛 Render no type attribute on DS buttons used as links (#12709)
* 🐛 Render no type attribute on DS buttons used as links

With `to`, button* renders an <a href> but still passed type="button". On
an anchor, type is a MIME type hint, so "button" is invalid HTML. The
type now applies only when the element is a <button> (still "button" by
default).

New "As Link" story with two tests: the link has its href and no type,
and a plain button keeps type="button".

AI-assisted-by: claude-opus-5-5

* 📚 Document the DS button as a link

The Semantics section only said that button* accepts `to`. It now says
when to use it (the control goes to another URL), what it renders (an
<a href> with the button style and no type), how to keep the in-app
navigation on a plain click, and shows the "As Link" story.

AI-assisted-by: claude-opus-5-5
2026-10-29 18:10:16 +01:00
..
2026-10-29 15:43:06 +01:00
2026-10-29 15:43:06 +01:00
2026-10-29 15:43:06 +01:00
2026-10-29 15:43:06 +01:00
2026-10-07 10:41:29 +02:00