From ec3d662de0bab08f8b68666d13c662c3193c2645 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sun, 24 May 2026 10:46:54 -0400 Subject: [PATCH] Make HTML button elements tab-stoppable in eww (bug#81107) * lisp/net/eww.el (eww-form-submit): Call put-text-property to add help-echo and shr-tab-stop properties. (eww-tag-input): Exclude inputs with type="submit" when adding the help-echo and shr-tab-stop properties, since that's now done in eww-form-submit, called earlier for type="submit". --- lisp/net/eww.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 9acbaa52fa9..542afa41180 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1771,7 +1771,10 @@ just re-display the HTML already fetched." (put-text-property start (point) 'keymap eww-submit-map) ;; Pretend to touch-screen.el that this is a button. (put-text-property start (point) 'button t) - (insert " "))) + (insert " ") + (put-text-property start (1+ start) 'help-echo "Button") + ;; Mark this as an element we can TAB to. + (put-text-property start (1+ start) 'shr-tab-stop t))) (defun eww-form-checkbox (dom) (let ((start (point))) @@ -1991,7 +1994,8 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") :value (or (dom-attr dom 'value) ""))))))) (t (eww-form-text dom))) - (unless (= start (point)) + (unless (or (= start (point)) + (equal type "submit")) (put-text-property start (1+ start) 'help-echo "Input field") ;; Mark this as an element we can TAB to. (put-text-property start (1+ start) 'shr-tab-stop t))))