Skip to content

Conversation

@gesa
Copy link
Member

@gesa gesa commented Sep 12, 2025

I got a little nerd sniped on Mastodon by a conversation about accessibility and print styles. Browsers mostly don't implement the CSS paged media module, and the web version of typical ecmarkup output doesn't use the oldtoc class, so I needed to add just a few little things to make the site printable for web visitors.

Important

I fully admit I appended some print-related event listeners to a javascript file (sdoMap.js) that I didn't otherwise spend the time to totally understand. I'm trusting the baseline knowledge of reviewers for this repo to tell me if that can/should go somewhere else.

page-break-after: always;
}

/* Styles for web users who wish to print (or "print") the document */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Styles for web users who wish to print (or "print") the document */
/* Styles for web users who wish to print (or print-to-pdf) the document */

I think this is what was meant by the scare quotes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol they weren't meant to be scare quotes, it was meant to communicate that using the "print" function may not be used for the purpose of putting ink (or toner) to paper

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, that means print-to-PDF, and it'd be easier for me to understand by calling it that. If there's other "print" functions, we could list them as examples too. It'd give me something concrete to think about when reading this.

@michaelficarra
Copy link
Member

Can you go into a little more detail about what this PR actually accomplishes?

@gesa
Copy link
Member Author

gesa commented Oct 5, 2025

It improves the readability of the document for visitors wishing to generate paged media. It's an accessibility improvement.

@michaelficarra
Copy link
Member

I get that, but the question was how do these styles and the moved around DOM nodes help the readability?

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.

3 participants