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

Missing Alt Attribute on WordPress.org Image Elements #462

Closed
bbertucc opened this issue Jul 2, 2024 · 9 comments
Closed

Missing Alt Attribute on WordPress.org Image Elements #462

bbertucc opened this issue Jul 2, 2024 · 9 comments
Labels
Accessibility Issues related to keyboard navigation, screen readers, etc

Comments

@bbertucc
Copy link

bbertucc commented Jul 2, 2024

Description:

An issue has been identified where image elements on several web pages lack the alt attribute. This attribute is essential for web accessibility as it provides alternative text for screen readers, ensuring that visually impaired users can understand the content conveyed by images.

Current Code:

Here is a CSV that contains all the items with missing alt text and URLs related to them:
query_result.csv

Correcting Alt Text:

Alt text for many of the images will be straight-forward (for example: a McDonald's logo can be "Logo for McDonalds"). That said, here is an article that I appreciate around creating useful alt text: https://adrianroselli.com/2024/05/my-approach-to-alt-text.html

@bbertucc bbertucc changed the title Equalify Reports: Missing Alt Attribute on Image Elements Jul 2, 2024
@bbertucc bbertucc changed the title Missing Alt Attribute on Image Elements Jul 2, 2024
@ryelle ryelle added the Accessibility Issues related to keyboard navigation, screen readers, etc label Jul 4, 2024
@ryelle
Copy link
Contributor

ryelle commented Jul 4, 2024

I think all of these are technically not valid… which means we're using alt attributes correctly everywhere else, hopefully?

I de-duplicated the source list to identify which pages were affected, and I'll drop that here:

List of de-duplicated source URLs
  1. https://wordpress.org/enterprise/content-marketing/
  2. https://wordpress.org/enterprise/ecommerce/
  3. https://wordpress.org/enterprise/education/
  4. https://wordpress.org/enterprise/integrations/
  5. https://wordpress.org/enterprise/media/
  6. https://wordpress.org/files/2022/08/community-photo-2-q50-scaled.webp
  7. https://wordpress.org/files/2022/08/community-photo-2-scaled.webp
  8. https://wordpress.org/files/2022/08/Community-Photo-scaled.webp
  9. https://wordpress.org/files/2022/08/Community-Photo_2560.webp
  10. https://wordpress.org/files/2022/08/Disney.png
  11. https://wordpress.org/files/2022/08/editor-bg-scaled-1.webp
  12. https://wordpress.org/files/2022/08/Editor-scaled.webp
  13. https://wordpress.org/files/2022/08/embed-image.png
  14. https://wordpress.org/files/2022/08/Showcase_2560.webp
  15. https://wordpress.org/files/2022/08/Sony-Music.png
  16. https://wordpress.org/files/2022/08/Spotify.png
  17. https://wordpress.org/files/2022/08/theme-styles.png
  18. https://wordpress.org/files/2022/08/Time-Magazine.png
  19. https://wordpress.org/files/2022/08/Vogue.png
  20. https://wordpress.org/files/2022/08/Wired.png
  21. https://wordpress.org/files/2022/10/a.png
  22. https://wordpress.org/files/2022/10/showcase_thumb_a.png
  23. https://wordpress.org/files/2022/10/showcase_thumb_b.png
  24. https://wordpress.org/files/2022/10/showcase_thumb_c.png
  25. https://wordpress.org/files/2022/10/showcase_thumb_d.png
  26. https://wordpress.org/files/2022/10/showcase_thumb_e.png
  27. https://wordpress.org/files/2022/10/showcase_thumb_f.png
  28. https://wordpress.org/files/2022/10/showcase_thumb_g.png
  29. https://wordpress.org/files/2022/10/showcase_thumb_h.png
  30. https://wordpress.org/files/2022/10/showcase_thumb_i.png
  31. https://wordpress.org/files/2022/10/showcase_thumb_j.png
  32. https://wordpress.org/files/2022/11/a-1.png
  33. https://wordpress.org/files/2022/11/a-2.png
  34. https://wordpress.org/files/2022/11/a.png
  35. https://wordpress.org/files/2022/11/b-1.png
  36. https://wordpress.org/files/2022/11/b-2.png
  37. https://wordpress.org/files/2022/11/b.png
  38. https://wordpress.org/files/2022/11/c.png
  39. https://wordpress.org/files/2022/11/enterprise-logos-1.png
  40. https://wordpress.org/files/2022/11/enterprise-logos-e1669846375339.png
  41. https://wordpress.org/files/2022/11/logo-people.png
  42. https://wordpress.org/files/2022/11/logo-readers.png
  43. https://wordpress.org/files/2022/11/logo-sun.png
  44. https://wordpress.org/files/2022/11/logo-variety.png
  45. https://wordpress.org/files/2022/11/logo-wwd.png
  46. https://wordpress.org/files/2022/11/NYP.png
  47. https://wordpress.org/files/2022/11/showcase_thumb_a-2.png
  48. https://wordpress.org/files/2022/11/showcase_thumb_a-3.png
  49. https://wordpress.org/files/2022/11/showcase_thumb_b-4.png
  50. https://wordpress.org/files/2022/11/showcase_thumb_b-5.png
  51. https://wordpress.org/files/2022/11/showcase_thumb_c-2.png
  52. https://wordpress.org/files/2022/11/showcase_thumb_c-3.png
  53. https://wordpress.org/files/2022/11/showcase_thumb_c-4.png
  54. https://wordpress.org/files/2022/11/wordpress-enterprise-header.png
  55. https://wordpress.org/files/2022/12/CNN-1.png
  56. https://wordpress.org/files/2022/12/CNN.png
  57. https://wordpress.org/files/2022/12/enterprise-use-cases-full.png
  58. https://wordpress.org/files/2022/12/Enterprise-Use-Cases.png
  59. https://wordpress.org/files/2022/12/facebook-1.png
  60. https://wordpress.org/files/2022/12/facebook.png
  61. https://wordpress.org/files/2022/12/Logos-BW-1.png
  62. https://wordpress.org/files/2022/12/Logos-BW.png
  63. https://wordpress.org/files/2022/12/microsoft-1.png
  64. https://wordpress.org/files/2022/12/microsoft.png
  65. https://wordpress.org/files/2022/12/NYP-1.png
  66. https://wordpress.org/files/2022/12/NYP.png
  67. https://wordpress.org/files/2022/12/People-1.png
  68. https://wordpress.org/files/2022/12/RD-1.png
  69. https://wordpress.org/files/2022/12/RD.png
  70. https://wordpress.org/files/2022/12/showcase_thumbs_a-75-scaled.webp
  71. https://wordpress.org/files/2022/12/showcase_thumbs_b-50-scaled.webp
  72. https://wordpress.org/files/2022/12/showcase_thumbs_c-50-scaled.webp
  73. https://wordpress.org/files/2022/12/sotw-drawer-background.png
  74. https://wordpress.org/files/2022/12/sotw-logo-large-1.png
  75. https://wordpress.org/files/2022/12/Spotify-1.png
  76. https://wordpress.org/files/2022/12/Spotify.png
  77. https://wordpress.org/files/2022/12/Sun-1.png
  78. https://wordpress.org/files/2022/12/Sun.png
  79. https://wordpress.org/files/2022/12/TED-1.png
  80. https://wordpress.org/files/2022/12/TED.png
  81. https://wordpress.org/files/2022/12/Variety-1.png
  82. https://wordpress.org/files/2022/12/Variety.png
  83. https://wordpress.org/files/2022/12/WordPress-Enterprise.png
  84. https://wordpress.org/files/2022/12/WWD-1.png
  85. https://wordpress.org/files/2022/12/WWD.png
  86. https://wordpress.org/files/2023/01/CNN.webp
  87. https://wordpress.org/files/2023/01/Extensibility.png
  88. https://wordpress.org/files/2023/01/facebook.webp
  89. https://wordpress.org/files/2023/01/Microsoft.webp
  90. https://wordpress.org/files/2023/01/NYP.webp
  91. https://wordpress.org/files/2023/01/Open_Source.png
  92. https://wordpress.org/files/2023/01/People-1.png
  93. https://wordpress.org/files/2023/01/People.webp
  94. https://wordpress.org/files/2023/01/RD.webp
  95. https://wordpress.org/files/2023/01/Security.png
  96. https://wordpress.org/files/2023/01/Spotify.webp
  97. https://wordpress.org/files/2023/01/Sun.webp
  98. https://wordpress.org/files/2023/01/TED.png
  99. https://wordpress.org/files/2023/01/TED.webp
  100. https://wordpress.org/files/2023/01/Variety.webp
  101. https://wordpress.org/files/2023/01/WordPress-Enterprise.png
  102. https://wordpress.org/files/2023/01/WWD.webp
  103. https://wordpress.org/files/2023/03/swag-bulk.png
  104. https://wordpress.org/files/2023/05/wp20-logo-white.png
  105. https://wordpress.org/files/2023/07/image-3-edited.png
  106. https://wordpress.org/files/2023/07/screencapture-wordpress-org-download-releases-6-3-2023-07-19-11_33_08.png
  107. https://wordpress.org/files/2023/08/Highlight-Grid.png
  108. https://wordpress.org/files/2023/10/270319241-c2f85fca-c6a3-4eb4-9e02-5b02ba8212c0.png
  109. https://wordpress.org/files/2023/11/Frame-52.png
  110. https://wordpress.org/files/2023/11/Group-51.png
  111. https://wordpress.org/files/2023/11/sotw-hero-2.png
  112. https://wordpress.org/files/2023/12/SotW-horizontal.png
  113. https://wordpress.org/files/2024/02/ele.png
  114. https://wordpress.org/files/2024/04/brush-hero.png
  115. https://wordpress.org/files/2024/04/brush.png
  116. https://wordpress.org/files/2024/04/feature-build.png
  117. https://wordpress.org/files/2024/04/feature-publish.png
  118. https://wordpress.org/files/2024/04/feature-style.png
  119. https://wordpress.org/files/2024/04/feature-whatsnew.png
  120. https://wordpress.org/files/2024/04/photo-community-1.png
  121. https://wordpress.org/files/2024/04/photo-community.png
  122. https://wordpress.org/files/2024/04/wordpress-homepage-ogimage-202404.png
  123. https://wordpress.org/files/2024/05/patterns-collage.jpg
  124. https://wordpress.org/files/2024/06/charcoal-logo.png

Pages 1-5 are real pages, but they were never launched (see https://meta.trac.wordpress.org/ticket/4825). The content on here is also not complete. I don't think we need to fix anything here — if we decide to launch these pages, they'll be recreated in the new theme.

Pages 6-124 (the rest) are all links to image files. I'm assuming this came from the fact that attachment pages (which had been indexed) are now redirecting to the image itself, and it looks like the node_html for these is just the img tag that Chrome renders for an image.

So I'm going to close this issue (and I'll leave some meta-feedback in slack).

@bbertucc
Copy link
Author

bbertucc commented Jul 5, 2024

@ryelle - makes sense to close this issue. I added a note to tune future scans to exclude scanning media items as pages.

I would also caution to say “we're using alt attributes correctly everywhere else”. This test just flag media items that didn’t have the alt attribute present. It skipped looking at how the alt attribute was used. For instance, media at this url https://wordpress.org/download/releases/6-5/ have the alt attribute but the alt attributes are empty. An empty alt attribute, like this alt=“”, is used for decorative images. Following W3C’s decision tree (link), I would say the images on that page “contribute meaning to the current page or context”. In that case, they should be described.

Unfortunately, I haven’t come across a good test to alert us to see if an image is truly decorative when alt text is empty. Most people choose to just look at every image that has alt=“”, and I can consider that approach next scan.

@ryelle
Copy link
Contributor

ryelle commented Jul 5, 2024

For instance, media at this url https://wordpress.org/download/releases/6-5/ have the alt attribute but the alt attributes are empty.

They were determined to be "decorative" by the a11y team, using the same criteria as we do for the about page— the content near it is describing what the image is showing. See #425 for that request.

I would also caution to say “we're using alt attributes correctly everywhere else”.

Of course, I'm well aware that alt text is more than just missing-or-there, and you can't automated-scan for meaning-related issues like whether the alt text is relevant. But I'm also (pleasantly) surprised that it didn't flag any other missing alt texts on the site.

@bbertucc
Copy link
Author

bbertucc commented Jul 5, 2024

Yes! It should be noted that the automated report turned up a lot fewer issues than expected. I will followup with the A11y team.

@joedolson
Copy link

The image cited by @bbertucc under the heading "And Much More" is different from all the other images on that page, in that it isn't accompanied by any supporting text. Instead, the image contains all of the information described by the heading. So, right now, for a screen reader experience, there's a heading "And Much More", then an empty image, and no additional features.

There's too much text in that panel to be really effective as alt text, and it also fails on other points - namely, 1.4.5: Images of Text.

Ideally, that panel would be a grid format with text & accompanying images. However, lacking that, there needs to be a bulleted list that provides all of the feature points on the page in simple text. Right now, it's clearly not an equal experience.

@jasmussen
Copy link
Contributor

The feature-grid image exists as a sort of summary of the whole page itself, one that you can take with you (save as, share elsewhere). In that sense, the grid shows glimpses of items covered in detail in the page itself:

Major highlights:

  • Color palettes and font sets
  • Quick previews for pages
  • Rollbacks for plugin auto updates
  • Patterns & overrides

Minor highlights:

  • Negative margins
  • Better pattern management for classic themes
  • Custom shadows
  • New grid block
  • Set styles for groups of blocks.

Additional features:

  • Aspect ratio presets
  • Shortcuts for editing (⌘G to group, Tab to indent list items)

If we were to add a text list of features below, it would be duplicative of what's already on the page. So that screen readers won't have to hear the same list of features twice, would the following alt text be reasonable?

A highlight grid showing all the features outlined in this document, collected in a visual table.

@joedolson
Copy link

@jasmussen If the image serves as a visual summary for sighted users, than the same should be available non-visually. Or, to put it another way, if the image version isn't unnecessary duplication for sighted users, than why would a text summary be unnecessary duplication for screen reader users?

The intent is to ensure that users have equal access to the information; summaries are useful for all users, so I think that yes, the full description should be made available.

That doesn't necessarily mean it has to be fully revealed by default; it could be inside a details/summary block as "image description", or something to that effect.

@jasmussen
Copy link
Contributor

Sure, happy to go with a details-collapsed summary. What I meant is, it's one thing to quickly glance over the grid, it just seems another to have to verbosely have read-aloud every item inside, repeated. Simply suggesting there might be nuance; ultimately someone who uses a screen reader daily would know best, and I'd defer to them.

@joedolson
Copy link

There is no such thing as a "quick glance" for a screen reader, because everything is linear. The important thing is the content is available.

And personally speaking, while I can quickly glance at the grid, it takes time and attention to actually get any information out of it, and that's not really different for a person using a screen reader with a list of relevant details.

A person who uses a screen reader can tell you whether or not the text is useful for them, but literally cannot tell you whether or not it's a good equivalence for the image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Issues related to keyboard navigation, screen readers, etc
4 participants