Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation issues on the home page #4441

Closed
jdlrobson opened this issue Jan 20, 2021 · 3 comments · Fixed by #4481
Closed

Fix validation issues on the home page #4441

jdlrobson opened this issue Jan 20, 2021 · 3 comments · Fixed by #4481
Labels
Lead: @jdlrobson Issues overseen by Jon (Front-end Lead) [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Priority: 2 Important, as time permits. [managed] Type: Bug Something isn't working. [managed] Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed] validation

Comments

@jdlrobson
Copy link
Collaborator

Incorrect HTML can lead to rendering issues and bugs.

Evidence / Screenshot (if possible)

The validator tool flags errors on the home page

e.g. https://validator.w3.org/nu/?doc=https%3A%2F%2Fopenlibrary.org%2F

Steps to Reproduce

  1. Run docker-compose exec web bash
  2. Use the validator tools direct input feature to flag errors on the home page
  3. fix errors in the associated templates
  4. submit a pull request addressing the issues.

Stakeholders

@jdlrobson

@jdlrobson jdlrobson added Type: Bug Something isn't working. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] labels Jan 20, 2021
@jdlrobson jdlrobson added Lead: @jdlrobson Issues overseen by Jon (Front-end Lead) [managed] Priority: 2 Important, as time permits. [managed] labels Jan 20, 2021
@SaravgiYash
Copy link
Contributor

@jdlrobson I would like to work on this issue.

@SaravgiYash
Copy link
Contributor

SaravgiYash commented Jan 20, 2021

@jdlrobson
image

1st Error: How should I fix the src error should I write src="blank.gif" or something else?
Because we can't replace data-lazy with src as mentioned in #3878 (comment)

2nd Error: How should I fix the duplicate id error? (Fixed)

@mekarpeles mekarpeles added the Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed] label Jan 20, 2021
@mekarpeles mekarpeles mentioned this issue Jan 20, 2021
7 tasks
@jdlrobson
Copy link
Collaborator Author

How should I fix the src error should I write src="blank.gif" or something else?

I'd recommend using a base64 1x1 png for this
You can get the base64 via https://png-pixel.com/
and make it a data uri in the src attribute per https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs

Make sure to use a constant so that URL doesn't make the template unreadable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @jdlrobson Issues overseen by Jon (Front-end Lead) [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Priority: 2 Important, as time permits. [managed] Type: Bug Something isn't working. [managed] Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed] validation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants