Bug 39998

Summary: Missing presentation role on layout tables.
Product: Koha Reporter: Nina Martinez <nina.martinez>
Component: AccessibilityAssignee: Nina Martinez <nina.martinez>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: julian.maurice, martin.renvoize, matt.blenkinsop, oleonard
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40221
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39998: Add presentation role to the layout tables.
Bug 39998: Add presentation role to the layout tables.

Description Nina Martinez 2025-05-26 14:43:41 UTC
When tables are used for layout purposes, we should add the WAI-ARIA presentation role attributes. 
Misinterpreting layout tables as data tables can confuse users who rely on assistive technologies. 
For example, a screen reader will interpret the element as a data table and announce the number of rows and columns and the content inside. 
By adding role=”presentation”, the screen reader will just read the elements making the content more accessible and easier to understand, without unnecessary information.
Comment 1 Nina Martinez 2025-05-27 15:25:29 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2025-06-16 13:33:21 UTC
Created attachment 183284 [details] [review]
Bug 39998: Add presentation role to the layout tables.

This patch improves the accessibility of the OPAC. It's a trivial patch
to help assistive technologies understand the different tables.

Test plan:

Enable the system preferences: OPACShelfBrowser, OPACPrivacy,
ShowComponentRecords.

1- On the Koha OPAC, Research a record.
2- Inspect the result page HTML and notice that there is a
   role='presentation' in the table tag.
3- Choose a record with a Component section and inspect the HTML, there
   should be a role='presentation' in the table tag.
4- Open the Browse shelf. Inspect the HTML and notice that there is a
   role='presentation' in the table tag of the browse shelf.
5- Log in to a patron account, go to the Your Summary page, and choose
   Privacy in the menu.
6- Inspect the HTML of the page and notice that there is a
   role='presentation' in the table tag of the 'Immediate deletion'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Owen Leonard 2025-06-16 13:34:37 UTC
> 3- Choose a record with a Component section and inspect the HTML, there
>    should be a role='presentation' in the table tag.

Bug 11175 has a sample record for this.