Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): Add name attribute to AnchorHTMLAttributes #10981

Merged
merged 3 commits into from
May 14, 2024

Conversation

mo
Copy link
Contributor

@mo mo commented May 9, 2024

Changes

Add "name" attribute in the type definition for AnchorHTMLAttributes, allowing the creating of in astro jsx

Testing

not tested

Docs

no docs, already documented in HTML docs

Copy link

changeset-bot bot commented May 9, 2024

🦋 Changeset detected

Latest commit: 3fe55b6

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label May 9, 2024
@Princesseuh
Copy link
Member

Is there any reasons you want to add name? That attribute was removed multiple years ago in HTML and is no longer used.

@mo
Copy link
Contributor Author

mo commented May 9, 2024

@Princesseuh I hadn't realized that people used id="" these days 🤦 ... but I guess this PR could still be merged since name="" still works and it's annoying to get warnings for valid code

@jacobdalamb
Copy link
Contributor

@Princesseuh I hadn't realized that people used id="" these days 🤦 ... but I guess this PR could still be merged since name="" still works and it's annoying to get warnings for valid code

You can extend it yourself https://docs.astro.build/en/guides/typescript/#built-in-html-attributes

@Princesseuh
Copy link
Member

Princesseuh commented May 14, 2024

I'd normally suggest adding it yourself, but since this is not actually the first time someone asks for it, I think it's useful. Since it still works in browsers, I assume there's also probably some packages out there that use it too.

Anyway, it's free to add 😄 Thank you!

@Princesseuh Princesseuh merged commit ad9227c into withastro:main May 14, 2024
4 checks passed
@astrobot-houston astrobot-houston mentioned this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants