diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 3dc0704a9..1fc93b9a1 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -368,12 +368,12 @@ class HintManager(QObject): """Find a prev/next element in frame.""" # First check for elems = frame.findAllElements( - webelem.SELECTORS[webelem.Group.prevnext_rel]) + webelem.SELECTORS[webelem.Group.links]) rel_values = ('prev', 'previous') if prev else ('next') for e in elems: if e.attribute('rel') in rel_values: return e - # Then check for regular links + # Then check for regular links/buttons. elems = frame.findAllElements( webelem.SELECTORS[webelem.Group.prevnext]) option = 'prev-regexes' if prev else 'next-regexes' diff --git a/qutebrowser/utils/webelem.py b/qutebrowser/utils/webelem.py index 9f2fc3adb..ffe10885d 100644 --- a/qutebrowser/utils/webelem.py +++ b/qutebrowser/utils/webelem.py @@ -36,18 +36,16 @@ from qutebrowser.utils.usertypes import enum from qutebrowser.utils.misc import compact_text -Group = enum('all', 'links', 'images', 'editable', 'url', 'prevnext_rel', - 'prevnext', 'focus') +Group = enum('all', 'links', 'images', 'editable', 'url', 'prevnext', 'focus') SELECTORS = { Group.all: ('a, area, textarea, select, input:not([type=hidden]), button, ' 'frame, iframe, [onclick], [onmousedown], [role=link], ' '[role=option], [role=button], img'), - Group.links: 'a, area, link', + Group.links: 'a, area, link, [role=link]', Group.images: 'img', Group.url: '[src], [href]', - Group.prevnext_rel: 'a, area, link, [role=link]', Group.prevnext: 'a, area, button, [role=button]', Group.focus: '*:focus', }