p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

[Image] Excessively long alternative text

Open coseeian opened this issue 5 months ago • 4 comments

Title

[Image] Excessively long alternative text

Description

An image (<img>) element on the page with very long (over 100 characters) alternative text. Non-text content must convey the same purpose or information as presented visually. When alt text is too long, users who rely on it may miss essential context or struggle to understand the content.

Steps to Reproduce

  1. go to tutorials/ and tutorials/setting-up-your-environment/
  2. Locate to the following element
<img class="aspect-photo object-cover" height="293" width="440" src="/_astro/SetupA.MT9CUmVs_UdPSt.webp" loading="eager" decoding="async" alt="An interactive sketch in the p5.js Web Editor draws circles on the canvas as the mouse pointer moves." style="">
<img height="1152" width="2048" src="/_astro/p5_editor_sign_up_page.ti-nvYfB_Z17jU5E.webp" loading="lazy" infersize="true" decoding="async" aspectratio="none" alt="An arrow pointing to the highlighted User Name, Emaill, Password, and Confirm Password fields on the Sign Up page." style="">

Actual Behavior

The image’s alt attribute contains more than 100 characters of description.

Expected Behavior

Alternative text should be concise and focused, describing the essential content and function of the image in a brief phrase or sentence.

Environments

No response

Suggested Fix

  1. Keep the alt text brief and focused—describe only the image’s essential purpose in a few words.
  2. If readers need more context, place supplementary details next to the image or link to a separate description page.
  3. Avoid hiding unique information solely in the alt text; ensure all critical content is visible elsewhere on the page.

Reference

What is your operating system?

None

Web browser and version

No response

coseeian avatar Jun 24 '25 07:06 coseeian

Hey ! Can I work on this issue ?

sprinklehappiness avatar Jun 26 '25 18:06 sprinklehappiness

Hi @sprinklehappiness ! The string one mentioned is on this .mdx page so you're welcome to make a PR based on the main branch first with a proposed rephrase, and once that is approved and merged, make the same PR on the other branch. I'll assign this to you. Woudl you also want to check other tutorials in case any others have alt texts longer than 100 characters?

ksen0 avatar Jun 27 '25 16:06 ksen0

@ksen0 Could you please review the changes ?

sprinklehappiness avatar Jun 28 '25 15:06 sprinklehappiness

Hi @sprinklehappiness , I've added some comments! Thanks for the patience. Happy to merge that PR when it's ready, and to keep this issue open for you (or anyone else) to find other too-long alt texts on other pages.

ksen0 avatar Jul 16 '25 09:07 ksen0