gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Missing alt/title options of inline image

Open strarsis opened this issue 6 years ago • 3 comments

Describe the bug The inline image is missing options for alt and title attributes.

To Reproduce

  1. Open Gutenberg editor.
  2. Insert inline image.
  3. When the inline image is selected, there is only an option for the width shown.

strarsis avatar Apr 03 '19 00:04 strarsis

Still the case in Gutenberg 7.9.1

Screenshot 2020-04-22 at 11 48 57

draganescu avatar Apr 22 '20 08:04 draganescu

When I try to reproduce this according to the original instructions (inserting a new inline image), the media modal pops up and I am prompted to enter or edit the alt text.

With that said, the alt-text is not editable when you edit an existing post that contains an inline image. (@afercia mentioned this at https://github.com/WordPress/gutenberg/issues/10595#issuecomment-430900146)

Do we want to keep this issue open and @strarsis could you edit your to description to reflect this update or close this issue and make a new one to reflect the issue?

skorasaurus avatar Dec 23 '20 18:12 skorasaurus

The title attribute is missing entirely. Only the alt gets inserted when using an inline image assuming it was set during insert (can't be edited after).

Image blocks can have the Alt and Title set both before and after insert. They should be included alongside width as mentioned by OP.

image

XVII avatar Jul 01 '24 04:07 XVII

The alt text field was added in #64124. The title field is considered an advanced field for the Image, and considering the help note, I'm not entirely sure how useful/valid it is these days.

cc @joedolson, @t-hamano.

Mamaduka avatar Mar 24 '25 18:03 Mamaduka

There is an effort to remove the title attribute from the core codebase: https://core.trac.wordpress.org/ticket/24766

Given that, I don't think the title attribute editing UI is necessary for inline images.

t-hamano avatar Mar 25 '25 02:03 t-hamano

For now, let's close this issue for now.

@strarsis If I've missed something, please feel free to comment.

t-hamano avatar Mar 25 '25 03:03 t-hamano

I don't think there's any benefit to providing editing of the title attribute. It serves little to no purpose.

joedolson avatar Mar 25 '25 03:03 joedolson

Thanks for the input, @joedolson and @t-hamano!

Mamaduka avatar Mar 25 '25 06:03 Mamaduka