Open j9t opened 1 year ago
Related: Have you considered a conformant way of testing this feature?
For example, using something like <script data-type=speculation>
?
This seems safer and less obtrusive for authors that work with a baseline quality standard of outputting valid markup.
(Personally and professionally, I’d have the expectation that an expert group like the one here has this in mind, and does not need reminding of conformance. The community needs us to pay attention to this.)
This proposal, if standardized, would aim to be eventually merged into the WHATWG HTML living standard. Import maps recently followed this path, and are now described in the relevant section of HTML. ECMAScript modules did something similar beforehand.
I don't follow your question about conformance. The HTML specification specifies that browsers should treat any unrecognized type as an unprocessed data block, and the conformance requirement on authors to use a MIME type is intended specifically to avoid collisions with future features added to the web platform which might use other keywords. This is just such a feature.
Using a different attribute name, like data-type
as you propose, would of course pass any existing validation checkers, but it would do so by instead polluting the namespace reserved for authors:
User agents must not derive any implementation behavior from these attributes or values. Specifications intended for user agents must not define these attributes to have any meaningful values.
HTML validators which reject unknown tag names, attribute names, etc. will of course error on content which uses newly proposed ones. I don't consider that surprising or a failure of the specification development process.
@domenic to confirm my understanding here is correct.
(Due to the holiday season, further replies to this issue might be delayed by a couple weeks; apologies for the inconvenience.)
The HTML specification knows no value “speculationrules” for the
type
attribute, and there don’t seem to be attempts yet to have a discussion about this and get this standardized.Am I missing something? Would it not benefit this feature if it got more scrutiny and support?