Skip to content

Tag the saved PDF with headings and lists, and title every download - #95

Open
NDL3wis wants to merge 1 commit into
mainfrom
fix/accessible-jd-pdf
Open

NDL3wis wants to merge 1 commit into
mainfrom
fix/accessible-jd-pdf

Conversation

@NDL3wis

@NDL3wis NDL3wis commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Why

"Download PDF" is the browser's Save as PDF. Chrome and Edge write a tagged PDF from the page's HTML, which is what a screen reader follows. The finished JD had one heading (the job title): section titles were styled divs, and each bullet was a typed "•" that a screen reader announces as text. The PDF's title was the page's tab title ("Greenhouse Tech · My JDs · JDWriter"). The Word files had no document title or language.

What changed

  • Finished JD (FinalJd.tsx): section titles are h3, and sub-headings (each function's "70% Greenhouse Operations", Education, ...) are h4, styled as before. Lists use real list markers instead of typed bullets.
  • Print title: on beforeprint/afterprint the page is named for the JD ("Greenhouse Tech - 009605"), so the PDF's title and default file name match the Word file. This covers Cmd+P as well as the button.
  • Word files (JD and VRF): carry a document title and en-US language.

The printed page looks the same as before, within a couple of pixels.

Safari's Save as PDF still writes an untagged file; that is outside the app's control.

Validation

  • Printed the same mock-API JD to PDF through Chrome's DevTools protocol (Page.printToPDF with tagging on), from main and from this branch, and read each PDF's structure tree:
    • main: title "Greenhouse Tech · My JDs · JDWriter", 1 heading, bullets as text.
    • This branch: title "Greenhouse Tech - 009605", 13 headings (H2, 6 × H3, 6 × H4), 14 list items with Lbl markers. Language en in both.
  • Compared renders of both PDFs: same layout.
  • Client: all 223 tests pass, type check and lint clean. New tests cover the heading and list structure and the print title.
  • Server: new tests for the JD and VRF Word title and language. Schema validation of both still passes. Full suite locally: 842 passed. The 13 failures are 12 CorpusMigrationTests that need the local SQL database, which was not running, and 1 live-API test. None touch this change.
  • Not done: the interactive Save as PDF dialog (Chrome tags it by default), a real JD rather than mock data, and listening with a screen reader.

🤖 Generated with Claude Code

… download

"Download PDF" is the browser's Save as PDF, which Chrome and Edge tag from the
page's HTML. Only the job title was a heading, and every bullet was a typed "•"
a screen reader read aloud. Section titles are now h3 and sub-headings (each
function's "70% Greenhouse Operations", Education, ...) h4, styled as before,
and lists use real list markers. While printing, the page is named for the JD
("Greenhouse Tech - 009605"), so the PDF's title and default file name match
the Word file.

The JD and VRF Word files now carry a document title and en-US language, which
Word's Accessibility Checker asks for and its own PDF export carries over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 536f8661-ae1b-4484-acea-41cbc8aa85b2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant