From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
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: <3366753b3a50e3fc@mandoc.bsd.lv> (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:
--------------
mandoc:
cgi.c
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)
html_print(req->q.query);
- 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 source+unsubscribe@mandoc.bsd.lv
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3366753b3a50e3fc@mandoc.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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).