#[solved] <a name="" /> is invalid in *.astro components - On purpose or ist it a bug?
17 messages · Page 1 of 1 (latest)
I'm not sure if it's Astro specifically, but probably a dependency that handles HTML typings.
depending on what you're trying to do, data-name might be a suitable alternative?
Hey @versed fractal ,
what I meant is: I cannot create an anchor element with a name attribute, which is standard HTML since at least HTML 3.2 (https://www.w3.org/TR/2018/SPSD-html32-20180315/#anchor)
It works totally fine if I add this to my *.d.ts file:
declare namespace astroHTML.JSX {
interface AnchorHTMLAttributes {
name?: string | undefined | null;
}
}
name kinda doesn't exist anymore, does it
On mdn it has a "deprecated" icon next to it
I honestly didn't know about this attribute
If it does have a purpose, we could add it for sure
it doesn't appear in the latest spec, although that's not to say browsers don't use it in some way 🤔
Ohh I see.. My apologies. Good to know. My HTML knowledge seems a bit ancient
Well no.. As you correctly pointed out, the MDN docs state that the ID attribute should be used instead.
Can I mark this support request as "solved" somehow?
you can change the title to include a prefix like (solved), or react with a ✅ or something similar on the original post, but there's no need too