Bug 39998 - Missing presentation role on layout tables.
Summary: Missing presentation role on layout tables.
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Nina Martinez
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-26 14:43 UTC by Nina Martinez
Modified: 2025-06-23 17:37 UTC (History)
4 users (show)

See Also:
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. (4.70 KB, patch)
2025-05-27 15:25 UTC, Nina Martinez
Details | Diff | Splinter Review
Bug 39998: Add presentation role to the layout tables. (4.78 KB, patch)
2025-06-16 13:33 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.