diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-07-06 17:19:58 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-07-06 17:19:58 +0000 |
commit | 9caf4c77cf46f1bdea3bb67285ad5aed31f6d305 (patch) | |
tree | 8a9feda86a4bcd728f4292dcd4cfb5e45a0423d0 /usr.bin/mandoc | |
parent | 4e20682487a5ab29deb4bb615dac126730eade79 (diff) |
For accessibility, label the last two widgets in the search form.
Patch from Anna Vyalkova <cyber at sysrq dot in>, significantly tweaked by me.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/cgi.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c index 48d0fc089ac..0ff5b980346 100644 --- a/usr.bin/mandoc/cgi.c +++ b/usr.bin/mandoc/cgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgi.c,v 1.118 2022/07/06 16:02:52 schwarze Exp $ */ +/* $OpenBSD: cgi.c,v 1.119 2022/07/06 17:19:57 schwarze Exp $ */ /* * Copyright (c) 2014-2019, 2021, 2022 Ingo Schwarze <schwarze@usta.de> * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> @@ -440,13 +440,14 @@ resp_searchform(const struct req *req, enum focus focus) /* 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. */ @@ -487,7 +488,8 @@ resp_searchform(const struct req *req, enum focus focus) /* 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) |