From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nicolas Graner Newsgroups: gmane.emacs.bugs Subject: bug#58973: tab navigation in EWW misses textarea and select Date: Wed, 02 Nov 2022 22:28:45 +0100 Message-ID: <87r0yldp0y.fsf@graner.name> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35154"; mail-complaints-to="usenet@ciao.gmane.io" To: 58973@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 02 22:29:13 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqLIO-0008yJ-Ny for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Nov 2022 22:29:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqLIG-0001sf-EH; Wed, 02 Nov 2022 17:29:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqLIE-0001sY-Ki for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 17:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqLIE-0001S9-Ch for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 17:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqLIE-0004KE-7i for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 17:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas Graner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Nov 2022 21:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58973 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166742453716613 (code B ref -1); Wed, 02 Nov 2022 21:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Nov 2022 21:28:57 +0000 Original-Received: from localhost ([127.0.0.1]:47282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqLI8-0004Js-Uh for submit@debbugs.gnu.org; Wed, 02 Nov 2022 17:28:57 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqLI7-0004Jl-Fw for submit@debbugs.gnu.org; Wed, 02 Nov 2022 17:28:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqLI7-0001rX-Ak for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 17:28:55 -0400 Original-Received: from ouvsmtp1.octopuce.fr ([194.36.166.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqLI5-0001Rq-Ah for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 17:28:54 -0400 Original-Received: from panel.vitry.ouvaton.coop (unknown [194.36.166.20]) by ouvsmtp1.octopuce.fr (Postfix) with ESMTPS id 6B69919A9 for ; Wed, 2 Nov 2022 22:28:46 +0100 (CET) Original-Received: from hypra-graner (215.124.67.86.rev.sfr.net [86.67.124.215]) by panel.vitry.ouvaton.coop (Postfix) with ESMTPSA id 13FCA5E28F0 for ; Wed, 2 Nov 2022 22:28:46 +0100 (CET) Received-SPF: pass client-ip=194.36.166.50; envelope-from=nicolas@graner.name; helo=ouvsmtp1.octopuce.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246895 Archived-At: In EWW mode, the function shr-next-link moves to the next active area, which may be a link or an 'input' tag. To make tab navigation in forms really operational, it should also stop at 'textarea' and 'select' tags. Below is my suggested patch. Hope this helps, Nicolas diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 414de931c4..3799ef96e8 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1596,7 +1596,8 @@ eww-tag-textarea (list :eww-form eww-form :value value :type "textarea" - :name (dom-attr dom 'name))))) + :name (dom-attr dom 'name))) + (put-text-property start (1+ start) 'shr-tab-stop t))) (defun eww-tag-input (dom) (let ((type (downcase (or (dom-attr dom 'type) "text"))) @@ -1660,7 +1661,8 @@ eww-tag-select (add-face-text-property start (point) 'eww-form-select) (put-text-property start (point) 'keymap eww-select-map) (unless (= start (point)) - (put-text-property start (1+ start) 'help-echo "select field")) + (put-text-property start (1+ start) 'help-echo "select field") + (put-text-property start (1+ start) 'shr-tab-stop t)) (shr-ensure-paragraph)))) (defun eww-select-display (select)