Skip to content

Commit

Permalink
Fix toggletip status change visibility for screen readers.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Feb 12, 2025
1 parent 911372e commit fbf523a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions themes/finna2/templates/_ui/components/finna-toggletip.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@
<?php if (!empty($icon)): ?><?=$this->icon($icon, 'finna-toggletip__icon')?><?php endif; ?>
<?= $label ?? '' ?>
</button>
<span role="status" class="tooltip bs-tooltip-auto finna-toggletip__bubble js-status">
<span class="tooltip-arrow finna-toggletip__arrow" data-popper-arrow></span>
<span class="tooltip-inner finna-toggletip__bubble--inner js-status-inner"></span>
<?php
// Note: role="status" needs to be on the outer element that is never hidden for screen readers to note the change
// in its contents.
?>
<span role="status">
<span class="tooltip bs-tooltip-auto finna-toggletip__bubble js-status">
<span class="tooltip-arrow finna-toggletip__arrow" data-popper-arrow></span>
<span class="tooltip-inner finna-toggletip__bubble--inner js-status-inner"></span>
</span>
</span>
</span>

0 comments on commit fbf523a

Please sign in to comment.