From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2859 invoked from network); 6 Jul 2022 17:40:12 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 6 Jul 2022 17:40:12 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 0dce30c8 for ; Wed, 6 Jul 2022 12:40:10 -0500 (EST) Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [129.13.231.82]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id fed84669 for ; Wed, 6 Jul 2022 12:40:08 -0500 (EST) Received: from hekate.asta.kit.edu ([2a00:1398:5:f401::77]) by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (envelope-from ) id 1o990R-00HVpt-AC; Wed, 06 Jul 2022 19:40:07 +0200 Received: from login-1.asta.kit.edu ([2a00:1398:5:f400::72]) by hekate.asta.kit.edu with esmtp (Exim 4.94.2) (envelope-from ) id 1o990Q-006LVA-Im; Wed, 06 Jul 2022 19:40:06 +0200 Received: from schwarze by login-1.asta.kit.edu with local (Exim 4.92) (envelope-from ) id 1o990Q-0000vg-VR; Wed, 06 Jul 2022 19:40:06 +0200 Date: Wed, 6 Jul 2022 19:40:06 +0200 From: Ingo Schwarze To: Anna Vyalkova Cc: tech@mandoc.bsd.lv Subject: Re: [PATCH] cgi.c: label query and manpath Message-ID: References: <20220706155209.2475-1-cyber@sysrq.in> X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220706155209.2475-1-cyber@sysrq.in> Hi Anna, Anna Vyalkova wrote on Wed, Jul 06, 2022 at 08:52:09PM +0500: > Is visible label OK? Or should it be hidden? https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/#naming_rule_visible_text is quite clear: using visible text is usually better: "In most circumstances, visible text labels also make the user interface easier to understand for all users." I think this does apply to the search query input box. Even some users *looking* at the form might feel unsure what to enter there. That does not appear to apply to the dropdrowns though because users looking at the form will readily understand from the visible default values what the purpose of the dropdowns is, whereas users of screen readers will profit from the ARIA labels. I committed the patch below. Where that is easily possible, i prefer expressing structure through nesting of elements rather than by using attributes. In this case, it is also shorter: same number of elements and two fewer attributes. This is now installed on man.bsd.lv for testing, too. Yours, Ingo Log Message: ----------- For accessibility, label the last two widgets in the search form. Patch from Anna Vyalkova , 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(" Search query:\n" + " q.query != NULL) html_print(req->q.query); - printf( "\" size=\"40\""); + printf("\" size=\"40\""); if (focus == FOCUS_QUERY) printf(" autofocus"); - puts(">"); + puts(">\n "); /* Write submission buttons. */ @@ -491,7 +492,8 @@ resp_searchform(const struct req *req, e /* Write manpath selector. */ if (req->psz > 1) { - puts(" "); for (i = 0; i < (int)req->psz; i++) { printf(" q.manpath, req->p[i]) == 0) -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv