Loading...
 
Skip to main content

Anchor elements such as icons used as buttons should have an ARIA role=button

Status
Closed
Subject
Anchor elements such as icons used as buttons should have an ARIA role=button
Category
  • Usability
Resolution status
Fixed or Solved
Submitted by
Gary Cunningham-Lee
Volunteered to solve
Josue Zirimwabagabo
Lastmod by
Josue Zirimwabagabo
Rating
(0)
Description

Currently in master and earlier Tiki versions there are instances of anchor links that display like a button, such as the buttons that toggle the display of the side columns. These don't use the button HTML element; they're anchor elements with text or an icon for a label. These should have an ARIA role=button parameter so that users of screen readers can understand their function.

The relevant Tiki file I believe is lib/smarty_tiki/FunctionHandler/Button.php.

Example:

Copy to clipboard
<a class="toggle_zone left btn btn-xs btn-secondary" title="Toggle left modules" href="#"><span class="icon icon-toggle-left fas fa-chevron-left "></span></a> // Should be: <a class="toggle_zone left btn btn-xs btn-secondary" title="Toggle left modules" role=button href="#"><span class="icon icon-toggle-left fas fa-chevron-left "></span></a>


Reference: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role

Solution
ARIA role was added by Josue, thanks.
Workaround
Importance
8
Easy to solve?
8
Priority
64
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8692
Created
Sunday 22 September, 2024 07:33:32 UTC
by Gary Cunningham-Lee
LastModif
Monday 07 April, 2025 22:23:41 UTC


Show PHP error messages