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

SVGImage does not support src attribute #1688

Closed
paroxp opened this issue Jan 7, 2020 · 5 comments
Closed

SVGImage does not support src attribute #1688

paroxp opened this issue Jan 7, 2020 · 5 comments

Comments

@paroxp
Copy link
Member

paroxp commented Jan 7, 2020

What

You seem to be using SVGs, with a fallback image defined as src attribute of an image tag. This appears not to be a thing in accordance to the API reference.

I'm not certain if this causes any issues. I do know, that using the href tag that is in fact documented, will break the design by loading both svg and fallback image.

Stumbled upon this whilst writing some syntax in TypeScript'ed React.

@NickColley
Copy link
Contributor

Heya :)

This is done intentionally so that the header will display the fallback only in older browsers, it is documented in our known warnings:

#1280 (comment)

Thank you for checking with us but I will close this as there's no action to take at this time.

@36degrees
Copy link
Contributor

The IE developer tools might show it requesting the fallback, but it should abort almost immediately before downloading anything. If you're seeing both requests actually completing in any browser, please let us know which browser / OS you're seeing this in so we can investigate.

Thanks

@paroxp
Copy link
Member Author

paroxp commented Jan 7, 2020

Thanks Nick, that's exactly what I was looking after.

Just to answer Oliver:
Screenshot 2020-01-07 at 15 08 29
But like Nick mentioned, this is somewhat desired :) I guess my types system needs to remain sad.

@36degrees
Copy link
Contributor

@paroxp I'm not seeing that in Chrome… is that using the exact same markup / styles as in GOV.UK Frontend?

@paroxp
Copy link
Member Author

paroxp commented Jan 8, 2020

No no, as I've mentioned in the initial issue:

using the href tag that is in fact documented, will break the design by loading both svg and fallback image

sorry for the confusion.

paroxp added a commit to alphagov/paas-admin that referenced this issue Jan 9, 2020
We need to have a reproducible way of handling React elements through
out the system. This is required to handle things like GOV.UK Frontend,
Page Titles, global CSRF tokens and similar shared elements.

We're also Reactifying the first piece of the system.

We have to sadly override some of the JSX interfaces globally, due to
some HTML backwards supportability. [See here][1]

[1]: alphagov/govuk-frontend#1688
paroxp added a commit to alphagov/paas-admin that referenced this issue Jan 13, 2020
We need to have a reproducible way of handling React elements through
out the system. This is required to handle things like GOV.UK Frontend,
Page Titles, global CSRF tokens and similar shared elements.

We're also Reactifying the first piece of the system.

We have to sadly override some of the JSX interfaces globally, due to
some HTML backwards supportability. [See here][1]

[1]: alphagov/govuk-frontend#1688
paroxp added a commit to alphagov/paas-admin that referenced this issue Jan 19, 2020
We need to have a reproducible way of handling React elements through
out the system. This is required to handle things like GOV.UK Frontend,
Page Titles, global CSRF tokens and similar shared elements.

We're also Reactifying the first piece of the system.

We have to sadly override some of the JSX interfaces globally, due to
some HTML backwards supportability. [See here][1]

[1]: alphagov/govuk-frontend#1688
paroxp added a commit to alphagov/paas-admin that referenced this issue Jan 20, 2020
We need to have a reproducible way of handling React elements through
out the system. This is required to handle things like GOV.UK Frontend,
Page Titles, global CSRF tokens and similar shared elements.

We're also Reactifying the first piece of the system.

We have to sadly override some of the JSX interfaces globally, due to
some HTML backwards supportability. [See here][1]

[1]: alphagov/govuk-frontend#1688
paroxp added a commit to alphagov/paas-admin that referenced this issue Jan 22, 2020
We need to have a reproducible way of handling React elements through
out the system. This is required to handle things like GOV.UK Frontend,
Page Titles, global CSRF tokens and similar shared elements.

We're also Reactifying the first piece of the system.

We have to sadly override some of the JSX interfaces globally, due to
some HTML backwards supportability. [See here][1]

[1]: alphagov/govuk-frontend#1688
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants