add tabindex to search results enabling selection through tab + enable opening selected result using return

This commit is contained in:
Tobias H. Petersen 2023-12-16 17:44:15 +01:00
parent 3ff0382a99
commit ea5b42d995

View File

@ -83,10 +83,19 @@ var updateOptionsTable = function(options) {
att1.value = "optrow";
tableRow.setAttributeNode(att1);
var att2 = document.createAttribute("tabindex");
att2.value = "0";
tableRow.setAttributeNode(att2);
var att2 = document.createAttribute("style");
att2.value = "overflow-wrap: break-word";
titleColumn.setAttributeNode(att2);
tableRow.onkeydown = function(e) {
if (e.keyCode == 13) {
tableRow.click();
};
};
var att3 = document.createAttribute("style");
att3.value = "overflow-wrap: break-word";
titleColumn.setAttributeNode(att3);
tableRow.appendChild(titleColumn);
tableRow.appendChild(descriptionColumn);