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

feat(core): add html language attribute #4702

Closed
wants to merge 6 commits into from

Conversation

lucioreyli
Copy link

@lucioreyli lucioreyli commented Mar 3, 2025

Summary

Related Links

https://dequeuniversity.com/rules/axe/4.10/html-has-lang
https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

Required by PageSpeed Insights
CleanShot 2025-03-03 at 14 14 13

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Mar 3, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 871f6a3
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/67c6262e74c8890008ce8954
😎 Deploy Preview https://deploy-preview-4702--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 56 (🟢 up 7 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@lucioreyli
Copy link
Author

The proposal of this feature is to not create a extra html file, just editing the default entry html file and fixing this accessibility issue

@CLAassistant
Copy link

CLAassistant commented Mar 3, 2025

CLA assistant check
All committers have signed the CLA.

@chenjiahan
Copy link
Member

Thank you for your contribution!

My concern is that adding a default setting of lang="en" might not be friendly for non-English language sites.

Another concern is whether we need to add a configuration for lang, as Rsbuild cannot add configuration for all common HTML attributes. Perhaps it is a better way to use html.template directly to fully control the template.

@chenjiahan chenjiahan closed this Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants