Skip to content

Commit

Permalink
[5.2] Remove alt-text for menuItem with image and title (#40675)
Browse files Browse the repository at this point in the history
  • Loading branch information
chmst authored Jan 18, 2025
1 parent 7c11cd0 commit b337054
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 20 deletions.
6 changes: 2 additions & 4 deletions modules/mod_menu/tmpl/default_component.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@
$image_attributes['class'] = $item->menu_image_css;
}

$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
$linktype = HTMLHelper::_('image', $item->menu_image, '', $image_attributes);

if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
$linktype .= '<span class="image-title' . ($itemParams->get('menu_text', 1) ? '' : ' visually-hidden') . '">' . $item->title . '</span>';
}

if ($item->browserNav == 1) {
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_menu/tmpl/default_heading.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$image_attributes['class'] = $item->menu_image_css;
}

$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
$linktype = HTMLHelper::_('image', $item->menu_image, '', $image_attributes);

if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_menu/tmpl/default_separator.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$image_attributes['class'] = $item->menu_image_css;
}

$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
$linktype = HTMLHelper::_('image', $item->menu_image, '', $image_attributes);

if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
Expand Down
6 changes: 2 additions & 4 deletions modules/mod_menu/tmpl/default_url.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@
$image_attributes['class'] = $item->menu_image_css;
}

$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
$linktype = HTMLHelper::_('image', $item->menu_image, '', $image_attributes);

if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
$linktype .= '<span class="image-title' . ($itemParams->get('menu_text', 1) ? '' : ' visually-hidden') . '">' . $item->title . '</span>';
}

if ($item->browserNav == 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@
$image_attributes['class'] = $item->menu_image_css;
}

$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
$linktype = HTMLHelper::_('image', $item->menu_image, '', $image_attributes);

if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
$linktype .= '<span class="image-title' . ($itemParams->get('menu_text', 1) ? '' : ' visually-hidden') . '">' . $item->title . '</span>';
}

if ($item->browserNav == 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
$image_attributes['class'] = $item->menu_image_css;
}

$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
$linktype = HTMLHelper::_('image', $item->menu_image, '', $image_attributes);

if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
$image_attributes['class'] = $item->menu_image_css;
}

$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
$linktype = HTMLHelper::_('image', $item->menu_image, '', $image_attributes);

if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
Expand Down
6 changes: 2 additions & 4 deletions templates/cassiopeia/html/mod_menu/dropdown-metismenu_url.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@
$image_attributes['class'] = $item->menu_image_css;
}

$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
$linktype = HTMLHelper::_('image', $item->menu_image, '', $image_attributes);

if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
$linktype .= '<span class="image-title' . ($itemParams->get('menu_text', 1) ? '' : ' visually-hidden') . '">' . $item->title . '</span>';
}

if ($item->browserNav == 1) {
Expand Down

0 comments on commit b337054

Please sign in to comment.