9a1687b6341af06ee8e0746a9a502ba09cee8284
lrnassar
  Tue Apr 7 16:11:57 2026 -0700
Add missing form labels and aria-labels across hgTables pages and main site search. refs #37343

Main page search bar (index.html): aria-label on search input.
hgTables main page (mainPage.c): aria-label on Galaxy/GREAT checkboxes,
fix Position label to target radio button instead of text input, aria-label
on position text input.
hgTables user regions (userRegions.c): aria-label on paste textarea and
file upload input.
hgTables filter page (filterFields.c): aria-label on all per-field filter
dropdowns and text inputs across string, numeric, integer, and enum field types.
hgTables intersect page (intersect.c): label elements on all 6 radio buttons
and 2 complement checkboxes, aria-label on threshold text inputs.

diff --git src/hg/hgTables/intersect.c src/hg/hgTables/intersect.c
index 725cdcf36cf..bf0b24c0381 100644
--- src/hg/hgTables/intersect.c
+++ src/hg/hgTables/intersect.c
@@ -1,25 +1,26 @@
 /* intersect - handle intersecting beds. */
 
 /* Copyright (C) 2014 The Regents of the University of California 
  * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
 
 #include "common.h"
 #include "linefile.h"
 #include "hash.h"
 #include "portable.h"
 #include "cheapcgi.h"
+#include "htmshell.h"
 #include "cart.h"
 #include "jksql.h"
 #include "trackDb.h"
 #include "bits.h"
 #include "bed.h"
 #include "hdb.h"
 #include "featureBits.h"
 #include "jsHelper.h"
 #include "hgTables.h"
 #include "customTrack.h"
 #include "hubConnect.h"
 #include "wikiTrack.h"
 
 
 /* We keep two copies of variables, so that we can
@@ -194,89 +195,93 @@
 	hPrintf("<BR>Note: %s has gene/alignment structure.  "
 		"Only the bases covered by its exons/blocks will be "
 		"considered.\n", iName);
     hPrintf("<H4>Intersect %s items with bases covered by %s:</H4>\n",
 	    name, iName);
     hPrintf("These combinations will maintain the names and "
 	    "gene/alignment structure (if any) of %s: <P>\n",
 	    name);
     }
 else
     hPrintf("<P>\n");
 
 op = cartUsualString(cart, hgtaNextIntersectOp, "any");
 jsTrackingVar("op", op);
 makeOpButton("any", op);
-printf("All %s records that have any overlap with %s <BR>\n",
-       name, iName);
+printf("<label for='%s_any'>All %s records that have any overlap with %s</label> <BR>\n",
+       hgtaNextIntersectOp, name, iName);
 makeOpButton("none", op);
-printf("All %s records that have no overlap with %s <BR>\n",
-       name, iName);
+printf("<label for='%s_none'>All %s records that have no overlap with %s</label> <BR>\n",
+       hgtaNextIntersectOp, name, iName);
 
 if (!wigOptions)
     {
     makeOpButton("more", op);
-    printf("All %s records that have at least ",
-	   name);
+    printf("<label for='%s_more'>All %s records that have at least </label>",
+	   hgtaNextIntersectOp, name);
     setting = cartCgiUsualString(cart, hgtaNextMoreThreshold, "80");
-    cgiMakeTextVar(hgtaNextMoreThreshold, setting, 3);
+    htmlPrintf("<INPUT TYPE=TEXT NAME='%s|attr|' ID='%s|attr|' SIZE=3 VALUE='%s|attr|'"
+        " aria-label='Minimum percent overlap'>",
+        hgtaNextMoreThreshold, hgtaNextMoreThreshold, setting);
     printf(" %% overlap with %s <BR>\n", iName);
     makeOpButton("less", op);
-    printf("All %s records that have at most ",
-	   name);
+    printf("<label for='%s_less'>All %s records that have at most </label>",
+	   hgtaNextIntersectOp, name);
     setting = cartCgiUsualString(cart, hgtaNextLessThreshold, "80");
-    cgiMakeTextVar(hgtaNextLessThreshold, setting, 3);
+    htmlPrintf("<INPUT TYPE=TEXT NAME='%s|attr|' ID='%s|attr|' SIZE=3 VALUE='%s|attr|'"
+        " aria-label='Maximum percent overlap'>",
+        hgtaNextLessThreshold, hgtaNextLessThreshold, setting);
     printf(" %% overlap with %s <P>\n", iName);
     }
 else
     {
     /*	keep javaScript onClick happy	*/
     hPrintf("<input TYPE=HIDDEN NAME=\"hgta_nextMoreThreshold\" VALUE=80>\n");
     hPrintf("<input TYPE=HIDDEN NAME=\"hgta_nextLessThreshold\" VALUE=80>\n");
     hPrintf(" <P>\n");
     }
 
 
 if (!wigOptions)
     {
     boolean bigWig = isBigWigTable(curTable);
     hPrintf("<H4>Intersect bases covered by %s and/or %s:</H4>\n",
 	    name, iName);
     if (!bigWig)
 	hPrintf("These combinations will discard the names and "
 		"gene/alignment structure (if any) of %s and produce a simple "
 		"list of position ranges.<P>\n",
 		name);
     makeOpButton("and", op);
-    printf("Base-pair-wise intersection (AND) of %s and %s <BR>\n",
-	name, iName);
+    printf("<label for='%s_and'>Base-pair-wise intersection (AND) of %s and %s</label> <BR>\n",
+	hgtaNextIntersectOp, name, iName);
     makeOpButton("or", op);
-    printf("Base-pair-wise union (OR) of %s and %s <P>\n",
-	name, iName);
+    printf("<label for='%s_or'>Base-pair-wise union (OR) of %s and %s</label> <P>\n",
+	hgtaNextIntersectOp, name, iName);
     hPrintf("Check the following boxes to complement one or both tables.  "
 	    "To complement a table means to include a base pair in the "
 	    "intersection/union if it is <I>not</I> included in the table."
 	    "<P>\n");
     if (!bigWig)
 	{
 	jsMakeTrackingCheckBox(cart, hgtaNextInvertTable, "invertTable", FALSE);
-	printf("Complement %s before base-pair-wise intersection/union <BR>\n",
-	       name);
+	printf("<label for='%s'>Complement %s before base-pair-wise intersection/union</label> <BR>\n",
+	       hgtaNextInvertTable, name);
 	}
     jsMakeTrackingCheckBox(cart, hgtaNextInvertTable2, "invertTable2", FALSE);
-    printf("Complement %s before base-pair-wise intersection/union <P>\n",
-	   iName);
+    printf("<label for='%s'>Complement %s before base-pair-wise intersection/union</label> <P>\n",
+	   hgtaNextInvertTable2, iName);
     }
 else
     {
     /*	keep javaScript onClick happy	*/
     jsTrackingVar("op", op);
     
     jsInline
 	(
 	"var invertTable=0;\n"
 	"var invertTable2=0;\n"
     	);
 
     hPrintf("(data track %s is not composed of gene records.  Specialized intersection operations are not available.)<P>\n", name);
     }