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

Validation error #38894

Open
2 tasks done
Viktor19931 opened this issue Mar 10, 2024 · 0 comments
Open
2 tasks done

Validation error #38894

Viktor19931 opened this issue Mar 10, 2024 · 0 comments
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@Viktor19931
Copy link

Viktor19931 commented Mar 10, 2024

Preliminary Checks

Description

https://validator.w3.org/ give me bunch of errors relative to gatsby-image-plugin

  1. The sizes attribute must only be specified if the srcset attribute is also specified
  2. Element img is missing required attribute src
  3. An img element which has an alt attribute whose value is the empty string must not have a role attribute (for image placeholder not passing alt attr)
  4. : Element source is missing required attribute srcset

I think its a bug but if I am wrong please let me know. Thank you

Screenshot 2024-03-10 at 23 26 35 Screenshot 2024-03-10 at 23 34 56 Screenshot 2024-03-10 at 23 36 07 Screenshot 2024-03-10 at 23 41 20

Reproduction Link

https://codesandbox.io/p/devbox/goofy-bell-2gx8cm?file=%2Fsrc%2Fpages%2Findex.js%3A32%2C4

Steps to Reproduce

I use dynamic images in my project

Expected Result

I should pass html validation
https://validator.w3.org/nu/?doc=https%3A%2F%2Famanitamuscariastore.online%2F

Actual Result

got plenty of errors with images

Environment

System:
    OS: macOS 14.2.1
    CPU: (12) arm64 Apple M2 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
  Browsers:
    Chrome: 122.0.6261.112
    Edge: 122.0.2365.80
    Safari: 17.2.1
  npmPackages:
    gatsby: ^5.12.4 => 5.12.4
    gatsby-cli: ^5.12.4 => 5.13.1
    gatsby-plugin-google-tagmanager: ^5.13.1 => 5.13.1
    gatsby-plugin-image: ^3.12.3 => 3.13.0
    gatsby-plugin-layout: ^4.13.0 => 4.13.0
    gatsby-plugin-manifest: ^5.13.0 => 5.13.0
    gatsby-plugin-mdx: ^5.13.0 => 5.13.0
    gatsby-plugin-minify: ^0.5.0 => 0.5.0
    gatsby-plugin-netlify: ^5.1.1 => 5.1.1
    gatsby-plugin-preload-fonts: ^4.13.0 => 4.13.0
    gatsby-plugin-react-helmet: ^6.13.0 => 6.13.0
    gatsby-plugin-react-i18next: ^3.0.1 => 3.0.1
    gatsby-plugin-robots-txt: ^1.8.0 => 1.8.0
    gatsby-plugin-sharp: ^5.12.3 => 5.13.0
    gatsby-plugin-sitemap: ^6.13.0 => 6.13.0
    gatsby-plugin-styled-components: ^6.12.0 => 6.13.0
    gatsby-source-filesystem: ^5.13.0 => 5.13.0
    gatsby-source-stripe: ^4.0.0 => 4.0.0
    gatsby-transformer-remark: ^6.13.0 => 6.13.0
    gatsby-transformer-sharp: ^5.12.3 => 5.13.0

Config Flags

DEV_SSR: false

@Viktor19931 Viktor19931 added the type: bug An issue or pull request relating to a bug in Gatsby label Mar 10, 2024
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

1 participant