Problem/Motivation

The 'copy install command' icons on the module modal have the wrong alt attribute text.

alt={Drupal.t('Copy the install command')}

The browser interprets this as:
Image of how the element is rendered

Proposed resolution

Make the code be properly evaluated inside the template literal string (ActionButton.svelte).

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Manual Testing
  • ☐ Code Review
  • ☐ Accessibility Review
  • ❌ Automated tests needed/written?
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mpaulo created an issue. See original summary.

mpaulo’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new11.79 KB

After changes

ramonvasconcelos’s picture

Assigned: mpaulo » ramonvasconcelos

I'll review it.

ramonvasconcelos’s picture

Assigned: ramonvasconcelos » Unassigned

The alt attribute is now correct after the changes from the MR.
+1

narendraR made their first commit to this issue’s fork.

narendrar’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm that icon alt is rendering properly now. Moving to RTBC.

bnjmnm made their first commit to this issue’s fork.

bnjmnm’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

This could benefit from a bit of test coverage, can probably be added to an existing test.

However, if the DrupalCI instance does not support navigator.clipboard (unsure if it is https), then it's probably impractical to add such coverage and we can just explain that in this issue.

narendrar’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new564.84 KB

Above test passes on local. See file on localhost http://localhost/project_browser/web

It might means that DrupalCI instance does not support navigator.clipboard.

bnjmnm’s picture

Status: Needs review » Reviewed & tested by the community

I snuck in one bit of logic in the past two commits to get the test working. The first attempt had the right solution, but wrong place. It was necessary to commit and push that change myself as I wasn't sure it would work on DrupalCI. It's probably not appropriate for me to commit, but I was prepared to commit once the test worked, and my small addition got it to work.

bnjmnm’s picture

Issue tags: +core-mvp

tim.plunkett made their first commit to this issue’s fork.

  • bnjmnm committed cf01a6fb on 1.0.x authored by mpaulo
    Issue #3314520 by bnjmnm, narendraR, tim.plunkett: Icons have...
bnjmnm’s picture

Status: Reviewed & tested by the community » Fixed

It's been over a month since my one little change to the test and that's long enough to objectively look at it and give it a passing review along with the entire rest of the MR I approved last night. So welcome to the codebase 3314520

Status: Fixed » Closed (fixed)

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