Merge pull request #24 from hallundbaek/enable-result-tabbing

Add keyboard navigation
This commit is contained in:
Pim Snel 2024-02-11 15:08:34 +00:00 committed by GitHub
commit f2e3000f95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);