Re: [whatwg/url] Qualify exported URL terms that are too generic (#375)

"fragment" is a really generic term no matter what; that sort of thing really should have a `for` value, no matter where it shows up.  URL fragment should have `for=URL` (which it does), box fragment should have `for=CSS` or something.  I do the same thing for "parse" in css-syntax; it's too generic of a term to just leave unadorned.

URL isn't "hijacking" anything here; `<a>fragment</a>` causes Bikeshed to properly emit a Link Error (because it can't decide between `css-break-3` and `url`), and it then makes an "arbitrary choice" between the two references ("arbitrary" because it's dependent on dict iteration order in Python).

(Adding a `for=CSS` won't change this behavior, btw.  The two references will still be ambiguous given that autolink.)

You can specify a link default for this in a given spec, or specify the `for` value directly on the link; if you're using the link shorthand, it's just `[=CSS/fragment=]`.

> Not that it'll help anything--afaict, the for attribute only works on syntactic constructs like methods, attributes, and property values, not regular terms. 

No, it works on everything.  (It's treated as a completely opaque namespace identifier.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/375#issuecomment-376010924

Received on Sunday, 25 March 2018 23:01:18 UTC