Skip to content

Commit afc3dff

Browse files
authored
change title to tooltip (#33839)
1 parent 9bbca25 commit afc3dff

File tree

1 file changed

+14
-21
lines changed
  • administrator/components/com_content/tmpl/articles

1 file changed

+14
-21
lines changed

administrator/components/com_content/tmpl/articles/default.php

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,9 @@
257257
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'articles.', $canCheckin); ?>
258258
<?php endif; ?>
259259
<?php if ($canEdit || $canEditOwn) : ?>
260-
<a href="<?php echo Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($item->title); ?>">
260+
<a href="<?php echo Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id); ?>" aria-labelledby="edit-<?php echo (int) $item->id; ?>">
261261
<?php echo $this->escape($item->title); ?></a>
262+
<div role="tooltip" id="edit-<?php echo (int) $item->id; ?>"><?php echo Text::_('JACTION_EDIT') . ' ' . $this->escape($item->title); ?></div>
262263
<?php else : ?>
263264
<span title="<?php echo Text::sprintf('JFIELD_ALIAS_LABEL', $this->escape($item->alias)); ?>"><?php echo $this->escape($item->title); ?></span>
264265
<?php endif; ?>
@@ -283,41 +284,33 @@
283284
if (Factory::getLanguage()->isRtl())
284285
{
285286
if ($canEditCat || $canEditOwnCat) :
286-
echo '<a href="' . $CurrentCatUrl . '" title="' . $EditCatTxt . '">';
287-
endif;
288-
echo $this->escape($item->category_title);
289-
if ($canEditCat || $canEditOwnCat) :
290-
echo '</a>';
287+
echo '<a href="' . $CurrentCatUrl . '" aria-labelledby="edit-cat-' . (int) $item->id . '">';
288+
echo $this->escape($item->category_title). '</a>';
289+
echo '<div role="tooltip" id="edit-cat-' . (int) $item->id.'">' . $EditCatTxt . '</div>';
291290
endif;
292291
if ($item->category_level != '1') :
293292
echo ' &#171; ';
294293
if ($canEditParCat || $canEditOwnParCat) :
295-
echo '<a href="' . $ParentCatUrl . '" title="' . $EditCatTxt . '">';
296-
endif;
297-
echo $this->escape($item->parent_category_title);
298-
if ($canEditParCat || $canEditOwnParCat) :
299-
echo '</a>';
294+
echo '<a href="' . $ParentCatUrl . '" aria-labelledby="edit-cat-' . (int) $item->id . '">';
295+
echo $this->escape($item->parent_category_title) . '</a>';
296+
echo '<div role="tooltip" id="edit-cat-' . (int) $item->id.'">' . $EditCatTxt . '</div>';
300297
endif;
301298
endif;
302299
}
303300
else
304301
{
305302
if ($item->category_level != '1') :
306303
if ($canEditParCat || $canEditOwnParCat) :
307-
echo '<a href="' . $ParentCatUrl . '" title="' . $EditCatTxt . '">';
308-
endif;
309-
echo $this->escape($item->parent_category_title);
310-
if ($canEditParCat || $canEditOwnParCat) :
311-
echo '</a>';
304+
echo '<a href="' . $ParentCatUrl . '" aria-labelledby="edit-cat-' . (int) $item->id . '">';
305+
echo $this->escape($item->parent_category_title) . '</a>';
306+
echo '<div role="tooltip" id="edit-cat-' . (int) $item->id.'">' . $EditCatTxt . '</div>';
312307
endif;
313308
echo ' &#187; ';
314309
endif;
315310
if ($canEditCat || $canEditOwnCat) :
316-
echo '<a href="' . $CurrentCatUrl . '" title="' . $EditCatTxt . '">';
317-
endif;
318-
echo $this->escape($item->category_title);
319-
if ($canEditCat || $canEditOwnCat) :
320-
echo '</a>';
311+
echo '<a href="' . $CurrentCatUrl . '" aria-labelledby="edit-cat-' . (int) $item->id . '">';
312+
echo $this->escape($item->category_title) . '</a>';
313+
echo '<div role="tooltip" id="edit-cat-' . (int) $item->id . '">' . $EditCatTxt . '</div>';
321314
endif;
322315
}
323316
?>

0 commit comments

Comments
 (0)