Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow doc-pagebreak in doc-pageheader #45

Closed
mattgarrish opened this issue Jan 5, 2023 · 6 comments
Closed

Allow doc-pagebreak in doc-pageheader #45

mattgarrish opened this issue Jan 5, 2023 · 6 comments

Comments

@mattgarrish
Copy link
Member

I was just going back over the 1.1 changes and noticed that the new doc-pageheader and doc-pagefooter roles both disallow doc-pagebreak.

This restriction makes sense for footers because we say that the page break identifies the start of its page, but I don't see why we should ban page breaks from headers. It just forces duplicated numbers in close proximity as far as I can tell. I think this restriction may have slipped in when we were discussing an alternative doc-pagenum role for the headers and footers, so didn't want the numbering roles to overlap.

I'd like to remove the restriction from the header definition and give some context for why it exists for footers.

Before I open a pull request, though, does this change make sense to you @aleventhal? (i.e., it doesn't present any problems for your potential use of the new header and footer roles, does it?)

@aleventhal
Copy link
Contributor

Thanks Matt. I don't remember why this was decided, or who's idea it was. Can you find any correspondence on that?

It just forces duplicated numbers in close proximity as far as I can tell.

Can you explain this part more?

@mattgarrish
Copy link
Member Author

Can you find any correspondence on that?

No, I was hoping you might remember... 😄

All I've been able to find is your original pull request #28 but it doesn't have any specific discussion about the restrictions. My guess would be that it was related to the abandoned request for a doc-pagenum role and not wanting confusion over where to place one or the other. If that was the case, though, it would further eliminate a need for restricting page breaks from headers.

It just forces duplicated numbers in close proximity as far as I can tell.

Can you explain this part more?

Going by the example in the specification, you'd need to mark an invisible page break with the same number outside the header, like this:

<section role="doc-pageheader">
   <div>War and Peace</div>
   <div>321</div>
</section>
<div role="doc-pagebreak" aria-label="321"/>
…

Headers aren't usually included in ebooks as they tend to cause confusion with the reading system-generated ones, but I don't see that publishers will like this kind of pattern if they do have to include them.

If we remove the restriction, the page number inside the header can be tagged once:

<section role="doc-pageheader">
   <div>War and Peace</div>
   <div role="doc-pagebreak">321</div>
</section>
…

@aleventhal
Copy link
Contributor

I agree with most of this, but I find that using the accessible name on a pagebreak for the page number to be funky -- not in the P-Funk sense, but in the bad smell sense :)

To me, the actual page break is above War and Peace.

@mattgarrish
Copy link
Member Author

mattgarrish commented Jan 5, 2023

I find that using the accessible name on a pagebreak for the page number to be funky

That's the way it's been done in EPUB for over a decade now, predating the role, so it may be but we can't change it without breaking content and the way publishers are operating right now.

To me, the actual page break is above War and Peace.

Yes, I don't know that anyone would do it this way (or do it at all), but I don't like declaring that it's absolutely not allowed. The page number could occur before the title (e.g., if the running header is set below the page number). It was only meant as a demonstration.

@aleventhal
Copy link
Contributor

Ok. How about we provide some guidance as to what is good, as opposed to making limitations on what's allowed? What the ideal structure?
Perhaps we should say something about how to avoid duplicated page numbers.

@mattgarrish
Copy link
Member Author

Closing with #46

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

No branches or pull requests

2 participants