aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_scripts/link_hints.coffee2
-rw-r--r--tests/dom_tests/dom_tests.coffee2
2 files changed, 3 insertions, 1 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index 18c608a5..a5e94fd0 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -214,6 +214,8 @@ class LinkHintsMode
(element.readOnly and DomUtils.isSelectable element))
when "button", "select"
isClickable ||= not element.disabled
+ when "label"
+ isClickable ||= element.control? and (@getVisibleClickable element.control).length == 0
# Elements with tabindex are sometimes useful, but usually not. We can treat them as second class
# citizens when it improves UX, so take special note of them.
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index 9d703774..e814ec76 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -243,7 +243,7 @@ context "Filtered link hints",
hintMarkers = getHintMarkers()
hintMarkers = getHintMarkers().map (marker) -> marker.textContent.toLowerCase()
# We don't know the actual hint numbers which will be assigned, so we replace them with "N".
- hintMarkers = hintMarkers.map (str) -> str.replace /^[1-5]/, "N"
+ hintMarkers = hintMarkers.map (str) -> str.replace /^[0-9]+/, "N"
assert.equal 5, hintMarkers.length
assert.isTrue "N" in hintMarkers
assert.isTrue "N" in hintMarkers