Today — Screen::to_svg produces a standalone <svg> with a viewBox, a font stack and one <text> per row. Measured on 0.10.1: grep -c '<title>' crates/termlens/src/screen/render.rs → 0. The element has no <title>, no role and no aria-label.
Why it is worth fixing — these SVGs are made to be attached to a pull request or a bug report (that is what #248 added them for, and what .github/actions/report uploads). An image in a PR with no accessible name is announced as nothing at all, and the fix is one element that SVG has for exactly this purpose.
Fix — in crates/termlens/src/screen/render.rs, emit <title> as the first child of <svg> with a short description of what the picture is (its size, at minimum — e.g. termlens screen, 80x24), and add role="img". Escape it with the same escape_xml helper the text rows use. Consider whether the title should be able to carry the terminal's own Screen::title when the application set one.
Done when
A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need git commit -s
(DCO). Happy to review a draft PR early.
Today —
Screen::to_svgproduces a standalone<svg>with aviewBox, a font stack and one<text>per row. Measured on 0.10.1:grep -c '<title>' crates/termlens/src/screen/render.rs→ 0. The element has no<title>, noroleand noaria-label.Why it is worth fixing — these SVGs are made to be attached to a pull request or a bug report (that is what
#248added them for, and what.github/actions/reportuploads). An image in a PR with no accessible name is announced as nothing at all, and the fix is one element that SVG has for exactly this purpose.Fix — in
crates/termlens/src/screen/render.rs, emit<title>as the first child of<svg>with a short description of what the picture is (its size, at minimum — e.g.termlens screen, 80x24), and addrole="img". Escape it with the sameescape_xmlhelper the text rows use. Consider whether the title should be able to carry the terminal's ownScreen::titlewhen the application set one.Done when
<title>and the root carriesrole="img".crates/termlens/tests/export.rs(or the existing SVG snapshot) covers it, including a screen whose title contains<or&.A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need
git commit -s(DCO). Happy to review a draft PR early.