UMB-CS-682-Team-03 / tracker

0 stars 0 forks source link

Mark the table used to layout search section with role=presentation #75

Closed rouilj closed 5 months ago

rouilj commented 5 months ago

The table is used for layout and should have role presentation to make screen readers and assistive tech happy.

diff --git a/html/classhelper.js b/html/classhelper.js
index 3ff630ef..224aeaa6 100644
--- a/html/classhelper.js
+++ b/html/classhelper.js
@@ -552,6 +554,7 @@ class ClassHelper extends HTMLElement {

         const table = document.createElement("table");
         table.classList.add("search-table"); // Add class for styling
+        table.setAttribute("role", "presentation");

         for (var param of params) {
             param = param.split("[]")[0];