Skip to content

Commit

Permalink
Move search filter tooltips to the icons for better accessibility
Browse files Browse the repository at this point in the history
Some screen readers were reading the search filter as "void 0" when
mouseovering it. We avoid this by moving the tooltip from the anchor
element to the icon itself.
  • Loading branch information
richieri-bps committed Dec 18, 2024
1 parent 2057b55 commit 7f0b00d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions share/html/Elements/CollectionAsTable/Header
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ foreach my $col ( @Format ) {
if ( $field && $filter_comp ) {
my $tooltip = loc( 'Filter on [_1]', loc($field) );
my $icon = exists $filter_data{filter}{$field} ? 'funnel-fill' : 'funnel';
$icon = GetSVGImage(Name => $icon);
$icon = GetSVGImage(Name => $icon, Title => $tooltip);
$m->out(
qq{&nbsp;<a href="javascript:void(0)" class="btn btn-primary button search-filter" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="$tooltip">$icon</a>}
qq{&nbsp;<a href="javascript:void(0)" class="btn btn-primary button search-filter">$icon</a>}
);
$m->out( $m->scomp( $filter_comp, Attribute => $field, FilterData => \%filter_data, %ARGS ) );
}
Expand Down

0 comments on commit 7f0b00d

Please sign in to comment.