Make WordPress Core

Opened 4 months ago

Closed 7 weeks ago

#64374 closed enhancement (fixed)

Alt text helper text can be more educational and visual indicator of opening in new tab

Reported by: burtrw's profile burtrw Owned by: joedolson's profile joedolson
Milestone: 7.0 Priority: normal
Severity: minor Version:
Component: Media Keywords: has-patch has-screenshots commit
Focuses: accessibility Cc:

Description (last modified by sabernhardt)

When viewing an image (media attachment), there is an input field for 'Alternative Text'.

Under the input field is helper text of:

Learn how to describe the purpose of the image (opens in a new tab). Leave empty if the image is purely decorative.

There should be a visual indicator that the link opens in a new tab. The helper text can also be made more concise and educational.

Suggested improvement:

Alt text describes the image's purpose. Leave it blank if the image is purely decorative. Learn more about alt text (opens in a new tab).

With the open in new tab dash icon at the end.

Attachments (1)

Screenshot 2025-12-09 105250.png (8.0 KB) - added by joedolson 4 months ago.
Alt text instructions in the block editor

Download all attachments as: .zip

Change History (16)

This ticket was mentioned in PR #10609 on WordPress/wordpress-develop by @burtrw.


4 months ago
#1

  • Keywords has-patch added

…st screen and media manager templates.

Updates the alt text description text in both the media attachment post screen and media manager templates. The new text is clearer and more concise, and includes an external link icon for better user experience.

Trac ticket: https://core.trac.wordpress.org/ticket/64374

---
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

#2 @sabernhardt
4 months ago

  • Description modified (diff)
  • Version trunk deleted

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


4 months ago

@joedolson
4 months ago

Alt text instructions in the block editor

#4 @joedolson
4 months ago

  • Milestone changed from Awaiting Review to 7.0
  • Owner changed from burtrw to joedolson
  • Status changed from assigned to accepted

Noting that the use of an icon would be consistent with the block editor, and a visual indicator is required; the current screen reader text is insufficient.

I'm also noting that the alt text instructions are currently not consistent between the media library and the block editor, and those should be re-aligned.

I'm not convinced by the changes you're suggesting, @burtrw; they make an already long instruction even longer, and I'm not convinced we need to be that verbose. Happy to hear your arguments, though.

#5 @burtrw
4 months ago

Appreciate the feedback @joedolson.

they make an already long instruction even longer

I agree, I don't like this. And I'd prefer consistency and brevity everywhere.

I really struggle with the current text of the link being 'Describe the purpose of the image.' as I don't really know why I would click on that link. That is what prompted me to open this ticket and propose a solution.

My first attempt was closer to:

Alt text describes the purpose of the image. Leave empty if decorative. [Learn more].

But then I didn't like the 'Learn more' text as it was not descriptive enough. Hm.

#6 @sabernhardt
4 months ago

  • Description modified (diff)

(editing ticket description to hide screen reader text visually and to show the dashicon)

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


2 months ago

#8 @audrasjb
2 months ago

  • Keywords changes-requested added

I would simply start by adding the visual indicator. The current text looks good to me.

#9 @joedolson
8 weeks ago

I'm inclined to agree with @audrasjb. Practically, I think that the text change doesn't add much, and isn't more concise, despite that being the intention. Making the text change would introduce extra labor for translators, and I don't think the payoff is that great.

Adding the icon, however, is something we should do. That will still impact translators, but the labor involved to make the change is minimal.

#10 @joedolson
8 weeks ago

I've updated the PR to only add the icon, without changing the text.

#11 @joedolson
8 weeks ago

  • Keywords changes-requested removed

@joedolson commented on PR #10609:


7 weeks ago
#12

Modal before:

https://github.com/user-attachments/assets/3ba773a5-fce3-4f80-9461-b3cac24f37ba

Modal after:

https://github.com/user-attachments/assets/48ce9914-87c8-4a40-a9ab-b90d3f46d8b2

Media screen before:

https://github.com/user-attachments/assets/ca669ea7-dda6-48cb-93a4-e59ffc86c433

Media screen after:

https://github.com/user-attachments/assets/9a8f9681-9924-45ef-ad1e-de3a8bf17b89

#13 @joedolson
7 weeks ago

  • Keywords has-screenshots added

#14 @joedolson
7 weeks ago

  • Keywords commit added

#15 @joedolson
7 weeks ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 61597:

Media: Add external icon to alt text links.

This link opens in a new tab, and needs a visual indicator to provide an affordance to sighted users that this will happen.

Props burtrw, sabernhardt, audrasjb, westonruter, joedolson.
Fixes #64374.

Note: See TracTickets for help on using tickets.