Add [ and ] navigation to verse pages

- [ goes to previous verse
- ] goes to next verse
- Update accessibility page to document verse page shortcuts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-03 01:27:12 -05:00
parent 3336863a4d
commit a3faf65ab4
2 changed files with 22 additions and 2 deletions
+10 -2
View File
@@ -183,13 +183,21 @@
</thead>
<tbody>
<tr>
<td><kbd></kbd></td>
<td><kbd>[</kbd></td>
<td>Previous verse</td>
</tr>
<tr>
<td><kbd></kbd></td>
<td><kbd>]</kbd></td>
<td>Next verse</td>
</tr>
<tr>
<td><kbd></kbd></td>
<td>Go back</td>
</tr>
<tr>
<td><kbd></kbd></td>
<td>Next verse (alternative)</td>
</tr>
<tr>
<td><kbd>Space</kbd></td>
<td>Read selected text aloud (press again to stop)</td>
+12
View File
@@ -1220,6 +1220,18 @@
{% if verse_num < total_verses %}
window.location.href = '/book/{{ book }}/chapter/{{ chapter }}/verse/{{ verse_num + 1 }}';
{% endif %}
} else if (e.key === '[') {
// Previous verse
e.preventDefault();
{% if verse_num > 1 %}
window.location.href = '/book/{{ book }}/chapter/{{ chapter }}/verse/{{ verse_num - 1 }}';
{% endif %}
} else if (e.key === ']') {
// Next verse
e.preventDefault();
{% if verse_num < total_verses %}
window.location.href = '/book/{{ book }}/chapter/{{ chapter }}/verse/{{ verse_num + 1 }}';
{% endif %}
}
});
})();