-
Change Request
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
I think it will be useful add HTML accesskey for the main search input box.
I am using searchbox extensively when I am working with Zabbix and using mouse again and again to set focus on the search input box is annoying.
The modification in zabbix 5 is simple, I have simply added line "->setAttribute('accesskey', 's')" to the file app/partials/layout.htmlpage.aside.php.
Whole code snippet now looks:
$search = (new CForm('get', 'zabbix.php')) ->cleanItems() ->addClass(ZBX_STYLE_FORM_SEARCH) ->setAttribute('role', 'search') ->addItem([ (new CVar('action', 'search'))->removeId(), (new CTextBox('search', getRequest('search', ''), false, 255)) ->addClass(ZBX_STYLE_SEARCH) ->setAttribute('autocomplete', 'off') ->setAttribute('aria-label', _('type here to search')) ->setAttribute('accesskey', 's'), $search_icon ]);
Now it is possible to get focus on search pressing ALT+S (in chrome, details https://www.w3schools.com/tags/att_global_accesskey.asp)
Please consider if this change is worth to add into standard zabbix source tree.