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

Unable to reference global HTML attributes #4466

Open
mattgarrish opened this issue Jun 30, 2023 · 2 comments
Open

Unable to reference global HTML attributes #4466

mattgarrish opened this issue Jun 30, 2023 · 2 comments
Labels

Comments

@mattgarrish
Copy link

If I use the syntax [^/class^], for example, to reference a global attribute I just get an error that whatever attribute I've named can't be found, even though I can reference the role attribute using [^/role^].

Adding a random element in front of the global attributes doesn't help, either.

Is there some other undocumented syntax to use for the global attributes, or is this a known limitation?

@dontcallmedom
Copy link
Member

if you search with xref, you'll see that [^global/class^] is the syntax that would work here; ultimately, the reason for this discrepancy is that the HTML spec hasn't historically applied the expected convention for global attributes. Presumably this could be fixed upstream, but this would likely require coordinating in fixing downstream specs that rely on the current name (there aren't so many for class, but this would have to be done for all global attributes)

@mattgarrish
Copy link
Author

Ah, thanks!

I was looking in section 3.4 in the documentation but it doesn't mention you can search. I see now there's a link in s. 5.3, but it might help to have both locations reference the search page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants