This commit is contained in:
mark committed 2026-09-09 10:12:39 -04:00
1 parent ce73c76126
commit 84c07a912b
5 files changed
+44 -133

No files matched your search

+15 -2
View File
@@ -588,8 +588,21 @@ def render_inline(nodes, book, chapter, out):
elif kind == "verse":
# Trailing space keeps the number off the text before any CSS
# lands; style .v with padding and it stays correct either way.
out.append('<span class="v" id="%s">%s</span> ' % (
verse_id(chapter, node["label"]), esc(node["label"])))
#
# A control, said here rather than by a pass over the page once it
# has landed. role is what announces it and what earns Reboot's
# [role=button] pointer cursor, tabindex is what puts it in the tab
# order, and the label is what a screen reader says in place of a
# bare number. All three are true of every verse in the corpus and
# none of them depends on anything only the browser knows, so
# there is nothing here for a script to work out: app.js used to
# set them on load, after every htmx swap and after every history
# restore, walking a whole book each time. The click itself never
# needed that pass -- it is delegated at #content in base.njk.
label = esc(node["label"])
out.append('<span class="v" id="%s" role="button" tabindex="0" '
'aria-label="Verse %s, options">%s</span> '
% (verse_id(chapter, node["label"]), label, label))
elif kind == "noteref":
n = node["id"].replace("FN", "")
out.append('<a class="noteref" id="fnref%s_%s" href="#fn%s_%s">'