help / color / mirror / Atom feed
Subject: mandoc: For accessibility, label the last two widgets in the search
Date: Wed, 6 Jul 2022 12:21:34 -0500 (EST)	[thread overview]
Message-ID: <> (raw)

Log Message:
For accessibility, label the last two widgets in the search form.
Patch from Anna Vyalkova <cyber at sysrq dot in>, significantly tweaked by me.

Modified Files:

Revision Data
Index: cgi.c
RCS file: /home/cvs/mandoc/mandoc/cgi.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -Lcgi.c -Lcgi.c -u -p -r1.179 -r1.180
--- cgi.c
+++ cgi.c
@@ -444,13 +444,14 @@ resp_searchform(const struct req *req, e
 	/* Write query input box. */
-	printf("    <input type=\"search\" name=\"query\" value=\"");
+	printf("    <label>Search query:\n"
+	       "      <input type=\"search\" name=\"query\" value=\"");
 	if (req->q.query != NULL)
-	printf( "\" size=\"40\"");
+	printf("\" size=\"40\"");
 	if (focus == FOCUS_QUERY)
 		printf(" autofocus");
-	puts(">");
+	puts(">\n    </label>");
 	/* Write submission buttons. */
@@ -491,7 +492,8 @@ resp_searchform(const struct req *req, e
 	/* Write manpath selector. */
 	if (req->psz > 1) {
-		puts("    <select name=\"manpath\">");
+		puts("    <select name=\"manpath\""
+		     " aria-label=\"Manual path\">");
 		for (i = 0; i < (int)req->psz; i++) {
 			printf("      <option");
 			if (strcmp(req->q.manpath, req->p[i]) == 0)
 To unsubscribe send an email to

                 reply	other threads:[~2022-07-06 17:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).