Hello,

On an image field with the alternative text required, as the field title is transformed into a placeholder, there is no red marker.

I saw in the code that "(Required)" is appended to the field description. I didn't see it on the page before seeing it in the code.

Quickly I see some solutions:
- Removing the special behavior for the alt text. But I don't think it will be pleasant to remove what has been done.
- Displaying the field title (with the red marker) + the placeholder
- Appending " (Required)" in the placeholder (and not in the field description?)

What is your opinion?

When an option will be chosen I will provide a patch for that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grimreaper created an issue. See original summary.

markhalliwell’s picture

Yes, let's go ahead and remove this special alt textfield behavior. It was added, by me, in the commit e460fb0.

I think I was attempting to simply make it "look good". At the time, I did not comprehend the ramifications of how necessary the "required" aspect would be. Especially now that this asterisk is being added via CSS/SVG.

Grimreaper’s picture

Status: Active » Needs review
FileSize
1.73 KB

Thanks for the response.

Yes, it looks good. Unfortunately, I think the required indicator is not enough visible.

Here is a quick patch.

Thanks for the review.

Grimreaper’s picture

Uploading another patch to be able to apply it from 8.x-3.0-rc2 version.

  • markcarver committed d54b2ea on 8.x-3.x authored by Grimreaper
    Issue #2779755 by Grimreaper: Alt text required for image without red...
markhalliwell’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.