Let users configure the text of the "Add media" button

Created on 9 September 2020, over 4 years ago
Updated 16 November 2023, about 1 year ago

Problem/Motivation

When a user encounters a Media field (for example, when creating a new node), they may be confused by the button that says, "Add media." Although "media" is well-understood by the Drupal community, it may be less familiar to other communities. Or, a site may use a Media field for a single media type, in which something like, "Add photos" or "Add files" may be a more appropriate action.

Steps to reproduce

  1. Configure a Media field on a node type.
  2. Use the "Media Library" widget (in the "Manage Form" tab).
  3. Create a new node: the button displayed says "Add media".

Proposed resolution

If we made the text of the button configurable through a field in the widget settings (of the "manage form" tab), then users could override the default text of "Add media".

Remaining tasks

We discussed this issue during a UX call. Remaining tasks are:

  1. Remove the word "Add" from "Add button text"
  2. Remove the word "media" from "No media items are selected." and "[x] media item[x] remaining." (help text around the media field)
  3. Write at least one automated test for this issue. Ideally, one would text if the default text is changed that it shows in a form (required), and the other would be to demonstrate that it's translatable (optional)
  4. Create a follow-up issue to address the "[x] media item[x] remaining." language, which we felt is a little confusing, but not completely related to this issue.
  5. Add images to the issue showing the various stages of the configuration (including translation) to expedite review

User interface changes

API changes

Data model changes

Release notes snippet

Feature request
Status

Needs work

Version

11.0 🔥

Component
Media 

Last updated about 14 hours ago

Created by

🇺🇸United States andileco

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024