summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2026-05-24 10:46:54 -0400
committerAmin Bandali <bandali@gnu.org>2026-05-30 10:12:12 -0400
commitec3d662de0bab08f8b68666d13c662c3193c2645 (patch)
tree9ba113724e578a31ef8e837068ed3bc15fa860da
parent72d890c43e70477d496a9a0ef36a61357dde1023 (diff)
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".
-rw-r--r--lisp/net/eww.el8
1 files 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))))