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

AC-2498-Images lacking meaningful alternative text. (Account - Order … #3944

Merged
merged 7 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const GET_PRODUCT_THUMBNAILS_BY_URL_KEY = gql`
items {
uid
sku
name
thumbnail {
label
url
Expand All @@ -29,6 +30,7 @@ export const GET_PRODUCT_THUMBNAILS_BY_URL_KEY = gql`
product {
sku
uid
name
thumbnail {
label
url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ Array [
>
<img
alt="Placeholder for gallery item image"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -191,6 +192,7 @@ Array [
>
<img
alt="Placeholder for gallery item image"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -242,6 +244,7 @@ Array [
>
<img
alt="Placeholder for gallery item image"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -293,6 +296,7 @@ Array [
>
<img
alt="Placeholder for gallery item image"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -344,6 +348,7 @@ Array [
>
<img
alt="Placeholder for gallery item image"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -395,6 +400,7 @@ Array [
>
<img
alt="Placeholder for gallery item image"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ exports[`renders form errors 1`] = `
>
<img
alt="Juno Sweater"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -455,6 +456,7 @@ exports[`renders form with data 1`] = `
>
<img
alt="Juno Sweater"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ exports[`Snapshot test 1`] = `
>
<img
alt="Jillian Top"
aria-hidden="true"
className="undefined undefined"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -93,6 +94,7 @@ https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/media/catalog/produc
>
<img
alt="Juno Sweater"
aria-hidden="true"
className="undefined undefined"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -168,6 +170,7 @@ https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/media/catalog/produc
>
<img
alt="Angelina Tank Dress"
aria-hidden="true"
className="undefined undefined"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports[`renders if \`items\` is an array of objects 1`] = `
>
<img
alt="Test Product 1"
aria-hidden="true"
className="image placeholder_layoutOnly"
height={375}
loading="eager"
Expand Down Expand Up @@ -110,6 +111,7 @@ exports[`renders if \`items\` is an array of objects 1`] = `
>
<img
alt="Test Product 2"
aria-hidden="true"
className="image placeholder_layoutOnly"
height={375}
loading="eager"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ exports[`renders a placeholder item while awaiting item 1`] = `
>
<img
alt="Placeholder for gallery item image"
aria-hidden="true"
className="image placeholder_layoutOnly"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -73,6 +74,7 @@ exports[`renders correctly with valid item data 1`] = `
>
<img
alt="Test Product"
aria-hidden="true"
className="image placeholder_layoutOnly"
height={375}
loading="eager"
Expand Down
1 change: 1 addition & 0 deletions packages/venia-ui/lib/components/Image/placeholderImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const PlaceholderImage = props => {
return (
<SimpleImage
loading="eager"
aria-hidden="true"
height={height}
width={width}
{...rest}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports[`Should disable delete icon while loading 1`] = `
>
<img
alt="P1"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -170,6 +171,7 @@ exports[`Should render correctly 1`] = `
>
<img
alt="P1"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -327,6 +329,7 @@ exports[`Should render correctly when configured to use variant thumbnail 1`] =
>
<img
alt="P1"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -484,6 +487,7 @@ exports[`Should render correctly with out of stock product 1`] = `
>
<img
alt="P1"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ exports[`should render properly 1`] = `
>
<img
alt="Product 1"
aria-hidden="true"
className="undefined undefined"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const CollapsedImageGallery = props => {
const baseImageElements = Object.values(items)
.slice(0, DISPLAY_COUNT)
.map((item, index) => {
const { thumbnail } = item;
const { label, url } = thumbnail;
const { thumbnail, name } = item;
const { url } = thumbnail;

return (
<Image
key={Object.keys(items)[index]}
alt={label}
alt={name}
src={url}
width={48}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ exports[`renders a transparent main image if no file name is provided 1`] = `
>
<img
alt="image-product"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -160,6 +161,7 @@ exports[`renders the Carousel component correctly w/ sorted images 1`] = `
>
<img
alt="test-thumbnail1"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -249,6 +251,7 @@ exports[`renders the Carousel component correctly w/ sorted images 1`] = `
>
<img
alt="test-thumbnail1"
aria-hidden="true"
className="image placeholder"
height={170}
loading="eager"
Expand Down Expand Up @@ -299,6 +302,7 @@ exports[`renders the Carousel component correctly w/ sorted images 1`] = `
>
<img
alt="test-thumbnail2"
aria-hidden="true"
className="image placeholder"
height={170}
loading="eager"
Expand Down Expand Up @@ -349,6 +353,7 @@ exports[`renders the Carousel component correctly w/ sorted images 1`] = `
>
<img
alt="test-thumbnail3"
aria-hidden="true"
className="image placeholder"
height={170}
loading="eager"
Expand Down Expand Up @@ -399,6 +404,7 @@ exports[`renders the Carousel component correctly w/ sorted images 1`] = `
>
<img
alt="test-thumbnail4"
aria-hidden="true"
className="image placeholder"
height={170}
loading="eager"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ exports[`renders root class if not the active Thumbnail 1`] = `
>
<img
alt="test-thumbnail"
aria-hidden="true"
className="image placeholder"
height={170}
loading="eager"
Expand Down Expand Up @@ -65,6 +66,7 @@ exports[`renders the Thumbnail component correctly 1`] = `
>
<img
alt="test-thumbnail"
aria-hidden="true"
className="image placeholder"
height={170}
loading="eager"
Expand Down Expand Up @@ -118,6 +120,7 @@ exports[`renders transparent placeholder when no file name is provided 1`] = `
>
<img
alt="placeholder-thumbnail"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Array [
>
<img
alt="Product Name"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ exports[`it renders a configurable wishlist item 1`] = `
>
<img
alt="Shoggoth Shirt"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down Expand Up @@ -133,6 +134,7 @@ exports[`it renders a simple wishlist item 1`] = `
>
<img
alt="Shoggoth Shirt"
aria-hidden="true"
className="image placeholder"
loading="eager"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
Expand Down