Replies: 3 comments
-
I personally think it was unwise to change the NU validator to try framing trailing slashes as a bad practice. It wasn't brought about by any changes to the WHATWG HTML spec. AFAIK the spec's stance on trailing slashes hasn't changed at all. Plus some of its code examples still use trailing slashes to this day. IMO it looks like the validator's maintainer tried tuning it to promote their personal preference. Case in point: the info message was originally categorized as a validation warning and was associated to a misleading message that used Google's style guide and a one-off test as justification. Pushback from users ultimately led to it being downgraded to an info message, along with a revised message linking out to a new wiki page with the maintainer's rationale. But all in all, the info message is still present to this day and is probably achieving its desired effect (nudging users to stop using closing slashes to get rid of spam messages). End result is that the validator is still promoting the maintainer's opinion. It adds lots of noise to validation results and is likely to be treated more like a warning than an info message by most users. I think I've even heard it referred to as a warning more than once in WET monthly update meetings lol. IMO this whole situation feels like someone that likes spaces more than tabs deciding to tune their popular tool to try framing the latter as a bad practice, then stubbornly-trying to hold on in the face of opposition. But I'm biased since I love both tabs + trailing slashes 😃. As far as WET/GCWeb and the MWS go... I'm not very thrilled with the idea of removing trailing slashes just to work around a quirk in the validator. But I realize that info message spam is a big nuisance to users and most folks are unlikely to try filtering them out in the validator's settings. Plus design decision 15 doesn't envision forcing a coding style onto anyone that prefers trailing slashes. Not to mention the MWS already filters-out trailing slashes when outputting components situated in content pages. So... I can live with it (even if my ego can't 😛 lol). |
Beta Was this translation helpful? Give feedback.
-
Just to add to my previous reply, I actually do agree with item 4 meriting a validator warning:
But the likelyhood of running into that situation is extremely slim in practice. Apart from the HTML spec's examples, I've personally not witnessed any web pages that have made use of unquoted attribute values since the days of HTML 4. Not even "in the wild" on sites that botch many other things. Anyway, the reason a warning wasn't implemented for that scenario instead of having the generic info message for all trailing slashes was because the maintainer felt that doing so would necessitate way more logic for very little gain. So it wasn't deemed to be worth the effort. |
Beta Was this translation helpful? Give feedback.
-
Thank you @EricDunsworth for your input on this design decision and point of view on trailing slashes for self-closing tags. I'll gather your valuable point of views with my findings aiming to come up with a solution that make sens. |
Beta Was this translation helpful? Give feedback.
-
Related to proposed design decision #15: https://wet-boew.github.io/wet-boew-documentation/decision/15.html
The design decision suggest to remove the trailing slash for void elements (self-closing tags) found in any Canada.ca templates for the following reasons:
We would like to start a discussion in order to get comments and/or suggestions in order to determine if we should keep trailing slashes or if we should move forward with the removal of trailing slashes for void elements (self-closing tags).
Beta Was this translation helpful? Give feedback.
All reactions