richie
richie copied to clipboard
Invalid HTML from some pages
Bug Report
Expected behavior/code
Richie rendered pages should be free from any invalid HTML markup.
By invalid, i mean against the Nu Html Checker which is to be considered as the reference (this is the official checker from W3C).
Actual Behavior
Here is the resume of reported errors:
- When the
srcset
attribute has any image candidate string with a width descriptor, thesizes
attribute must also be present- On homepage;
- Category detail page;
- Organization detail page;
- Person detail page;
- Program detail page;
- About page (the demo version which is alike a sandbox with some various plugins usages);
- Finally this appears on page which have course and organizations glimpses.
- Element
<meta>
not allowed as child ofdl
tag in this context.- Only on course detail pages which have course run sessions (involved
<dl>
is the session list);
- Only on course detail pages which have course run sessions (involved
There is also some warnings but i won't report them here since they are not so much important. From memory this is almost about some <section>
missing title tag (h1, h2, ..), something which only matters for SEO in some context.
Steps to Reproduce
- Open the Nu Html Checker;
- Use a Richie site which is reachable from internet;
- Get page urls for stated list of invalid html previously listed. Some few pages may be exempted from any error because they do not include the faulty contents;
- See the error report.
Environment
- Richie version: Current unreleased version (almost all reported errors was present before but some of them have been corrected recently)
- Platform: Any
Possible Solution
For the srcset
error, it is "simply" needed to add missing attribute sizes
however the srcset feature is a little bit complex to correctly configure. Maybe other template fragment that did it well can be a source of inspiration.
For the <meta>
error, i'm not very sure about this since WHATWG specification defines that <meta>
tag with attribute itemprop
is allowed almost anywhere but in Richie they do not have this attribute (they have property
instead) so there should be other reported errors for <meta>
inside div.course-detail__content
element. So i don't know if it is totally invalid (with property
attribute usage only) or just for inside some block like <dl>
.