alphagov / tech-docs-gem

Gem to distribute the tech docs project
https://tdt-documentation.london.cloudapps.digital/
MIT License
15 stars 38 forks source link

Error in HTML output #137

Closed ch-rfishwick closed 5 years ago

ch-rfishwick commented 5 years ago

HTML pages rendered from markdown contain a number of errors, at least one of which is also present in the webpage generated using the template in the example project.

NickColley commented 5 years ago

Hello @ch-rfishwick !

I have removed your zip download as it could be dangerous for us to download. However I have reproduced the output with the online validator:

https://validator.w3.org/nu/?doc=https%3A%2F%2Ftdt-documentation.london.cloudapps.digital%2F%23technical-documentation-template

The errors that we intend to fix are recorded here:

The other warnings are not a cause for concern: https://github.com/alphagov/govuk-frontend/issues/1280#issuecomment-509588851

Since we're tracking these already I'm going to close your issue out thanks for raising this with us.

ch-rfishwick commented 5 years ago

I believe we were comparing different pages. The error (not warning) to which I was referring can be found if you simply run the example project with the tech-docs-gem repo (or any generated projects) and has to do with the crown logo.

The error description is 'Attribute src not allowed on element image at this point.', found on line 69, columns 13 to 154.

The actual code snippet under suspicion:

<image src="/assets/images/govuk-logotype-crown.png" xlink:href="" class="govuk-header__logotype-crown-fallback-image" width="36" height="32">
NickColley commented 5 years ago

Hello @ch-rfishwick,

If you look at this GitHub issue it covers warnings that are not a problem here: https://github.com/alphagov/govuk-frontend/issues/1280

That specific issue is an intentional fallback for older browsers.