Version 2.2 changed the line that adds the menu-item class to <li> tags, from:

if (!empty($link_plugin['options']['menu_icon']['fid'])) {
  $mlid = $link_plugin['metadata']['entity_id'];
  $item['attributes']->addClass('menu-icon menu-icon-' . $mlid);
}

to:

$mlid = $link_plugin['metadata']['entity_id'];
$item['attributes']->addClass('menu-icon-' . $mlid);

This broke my site, leaving me without a way to apply a uniform style all menu icon items (I used this to hide the text while still making it accessable to screen readers). Perhaps there's a reason this was removed that I don't understand, since the if block that surrounds those lines that was also removed, but it's possible this was a simple oversight, since there was also a lot of refactoring in that file.

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

Mark LaCroix created an issue. See original summary.

miroslav-lee made their first commit to this issue’s fork.

miroslav-lee’s picture

Status: Active » Needs review

  • miroslav-lee committed 70a4495 on 8.x-2.x
    Issue #3181383: Update removed "menu-icon" class from all list items
    
podarok’s picture

Status: Needs review » Fixed

Thank you

Status: Fixed » Closed (fixed)

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