-
Notifications
You must be signed in to change notification settings - Fork 527
Use data-*
for head elements
#2438
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
base: master
Are you sure you want to change the base?
Use data-*
for head elements
#2438
Conversation
To be clear, this is probably a breaking change. If one has Not sure if Inertia is willing to introduce a breaking change there, or refactor the code to also account for the legacy use-case. |
Can't we leave the attribute |
The problem is, leaving it as just |
To give a few examples: Both sites use Inertia and have |
I think it's a good change to move to |
I had trouble getting my app to pass HTML validation to comply with Section 508(a) and WCAG AAA accessibility guidelines. As far as breaking changes go, if a backwards-compatible solution is preferred, I wouldn't mind. To fix it, just add |
I've updated the PR so that it supports both the |
My idea was it would default to using |
I'm facing the same issue, especially in combination with SEO tools such as e.g. ahrefs. Their site audits look specifically for I really hope this will be fixed / merged soon! |
Inertia now uses the
inertia
attribute on all the head elements. However, this is invalid HTML in many cases. For example the<title>
element only allows for global attributes. These attributes consist of existing HTML attributes, not non-existing attributes. This means usingdata-*
attributes is only allowed for the<title>
element. Currently Inertia apps would thus fail HTML validation.