Skip to content

Commit

Permalink
Add aria-label attribute to GetSVGImage when Title is sent
Browse files Browse the repository at this point in the history
Each column header on the ticket results page has a filter icon.
Although this icon has a title, it was not being read correctly
by screen readers like NVDA, which would speak "void zero."

This change adds an aria-label to any generated SVG when a
Title is provided. This improves screen reader compatibility
and ensures the icons are read meaningfully.
  • Loading branch information
richieri-bps committed Dec 20, 2024
1 parent 4beb027 commit f901e36
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/RT/Interface/Web.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6200,6 +6200,7 @@ sub GetSVGImage {

if ( $args{'Title'} ) {
$svg .= q{ data-bs-toggle="tooltip" title="} . $m->interp->apply_escapes( $args{Title}, 'h' ) . q{"};
$svg .= q{ aria-label="} . $m->interp->apply_escapes( $args{Title}, 'h' ) . q{"};
}
$svg .= '>';
my $config = RT->Config->Get('SVG') || {};
Expand Down

0 comments on commit f901e36

Please sign in to comment.