MozillaFoundation / foundation.mozilla.org

Mozilla Foundation website
https://foundation.mozilla.org
Mozilla Public License 2.0
384 stars 153 forks source link

Fix HTML validation errors #9875

Open mmmavis opened 1 year ago

mmmavis commented 1 year ago

We have A LOT of HTML errors on the site. Numbers are quite high :see_no_evil: Here are the results of the 5 random pages I tested using https://validator.w3.org/

Why should we fix these errors?

From an online source

There are some markup cases defined as errors because they are potential problems for accessibility, usability, interoperability, security, or maintainability—or because they can result in poor performance, or that might cause your scripts to fail in ways that are hard to troubleshoot. Along with those, some markup cases are defined as errors because they can cause you to run into potential problems in HTML parsing and error-handling behavior—so that, say, you’d end up with some unintuitive, unexpected result in the DOM.

How to address these issues?

┆Issue is synchronized with this Jira Epic

tbrlpld commented 1 year ago

Ouch

tbrlpld commented 1 year ago

I am also working on getting HTML template linting and formatting set up (#9034). Well, actually it's already merged. You can run inv lint-html. What is missing is fixing the issues pointed out and making the CI step required.

mtdenton commented 1 year ago

This was one of the topics that we would have addressed in the Torchbox SEO evaluation/fix work that never came to fruition. Let's break this issue out into more manageable chunks, maybe by page, and we'll get those prioritized in the backlog.

tbrlpld commented 1 year ago

@mmmavis Can you add some info which tool / HTML validator you used to generate that initial list?

mmmavis commented 1 year ago

Yup. Updated the ticket description to mention https://validator.w3.org/ There are other tools for sure but this is the one I've been using.

mmmavis commented 1 year ago

Found some tools listed on https://validator.w3.org/nu/about.html . html5validator in particular might be the most helpful for our use case. Though I'm not sure if our GitHub security settings will allow us to use it as it's from outside of the org 😬

mmmavis commented 1 year ago

I'm thinking we can start fixing from pages that get the most traffic and aim to fix 1 to 3 pages per sprint? Many components/code snippets are shared so hopefully the number of HTML errors for the remaining pages will go down significantly after we fix the first few pages.

tbrlpld commented 9 months ago

@jhonatan-lopes I looks like that this was not broken down into smaller ticket. The epic in Zenhub only contains #9484. I can start with that one.

If we can get access to the traffic information, I could add tickets for those and start working them.

jhonatan-lopes commented 9 months ago

Hey @tbrlpld, I would start with the Homepage, the PNI Homepage and the Blog Homepage (I think those receive the most traffic).

@mtdenton do you have info on which pages we should prioritise first here?

tbrlpld commented 8 months ago

After fixing the three of the most prominent pages (home, blog index and PNI home) we can probably shift focus to the highest traffic pages.

Based on traffic data I have received from the SEO team that should be:

mtdenton commented 8 months ago

Thanks @tbrlpld , feels like a sound approach.

tbrlpld commented 8 months ago

PRs for the above pages are in.

The next most prominent page types are (based on traffic data):

jhonatan-lopes commented 7 months ago

Remaining tickets: