Skip to content

Commit

Permalink
Fix incorrect "aria-role" attributes
Browse files Browse the repository at this point in the history
Also, change the "tooltip" value for these attributes to "img" as a
better role for the icons here

(fix #2111)
  • Loading branch information
zerocrates committed Nov 16, 2023
1 parent 7680b56 commit 619c0af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/view/common/resource-values.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ foreach ($values as $term => $propertyData):
<?php endif; ?>
<span class="value-content"><?php echo $filterLocale ? $value->asHtml($lang) : $value->asHtml(); ?></span>
<?php if(!$value->isPublic()): ?>
<span class="o-icon-private" aria-role="tooltip" title="<?php echo $this->escapeHtml($translate('Private')); ?>" aria-label="<?php echo $this->escapeHtml($translate('Private')); ?>"></span>
<span class="o-icon-private" role="img" title="<?php echo $this->escapeHtml($translate('Private')); ?>" aria-label="<?php echo $this->escapeHtml($translate('Private')); ?>"></span>
<?php endif; ?>
<?php if ($valueAnnotation && $showValueAnnotations): ?>
<a href="#" class="<?php echo ('expanded' === $showValueAnnotations) ? 'collapse' : 'expand'; ?>" aria-label="<?php echo ('expanded' === $showValueAnnotations) ? $this->escapeHtml($translate('Collapse')) : $this->escapeHtml($translate('Expand')); ?>">
<span class="has-annotation o-icon-annotation" aria-role="tooltip" title="<?php echo $this->escapeHtml($translate('Has annotation')); ?>" aria-label="<?php echo $this->escapeHtml($translate('Has annotation')); ?>"></span>
<span class="has-annotation o-icon-annotation" role="img" title="<?php echo $this->escapeHtml($translate('Has annotation')); ?>" aria-label="<?php echo $this->escapeHtml($translate('Has annotation')); ?>"></span>
</a>
<div class="collapsible annotation">
<?php echo $valueAnnotation->displayValues(); ?>
Expand Down

0 comments on commit 619c0af

Please sign in to comment.