You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Roger Pilkey (Jira)" <ji...@apache.org> on 2021/05/07 14:50:00 UTC

[jira] [Comment Edited] (FOP-3011) Common header and footer announced multiple times by screen reader

    [ https://issues.apache.org/jira/browse/FOP-3011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17340878#comment-17340878 ] 

Roger Pilkey edited comment on FOP-3011 at 5/7/21, 2:49 PM:
------------------------------------------------------------

I am just another user who has run into this, here's my explanation.

The purpose of the tags is to contain the content of the document.

I think you are probably using region-before and static-content to create what is called "running headers" or "running footers".
 These running headers are visible on the page, but relative to the document content, they interrupt the content with repeated text.

I think you're supposed to create running headers in xsl-fo with <fo:static-content>

e.g.

 
{code:java}
<fo:region-before region-name="header0" extent="0.75cm"/>
<fo:static-content flow-name="header0">
  <fo:block>stuff</fo:block>
</fo:static-content>
{code}
 

which will repeat that content at the top of every page.

So FOP tags the visible text, but where do you put the tags? If you create tags where they appear on the pages, then they will interrupt the content. Think of a ten page table, it would not be correct to repeat a page header every 20 rows. The table contents should be uninterrupted. Also, I don't know if the processing even knows when it's at the top and bottom of a page at that point.
 FOP doesn't throw away the text that is on every page, which would cause text with missing tags (fail), but it's all smooshed together in tags at the top and bottom as you've seen.

What I've tried:

1. manually go into the PDF after it's created and remove the extra tags. Ouch. But then you have visible text content that isn't tagged, and your accessibility checking software will complain.

2. move your content out of the static sections, repeating them in the <fo:region-body> loop. Then they will be read out on every page. If that's appropriate for your document.

3. look for places in your fo:static-content tags to insert this:
{code:java}
<fo:wrapper role="artifact">
 
</fo:wrapper>{code}
then those blocks won't be tagged.

You could artifact only on pages after page one if you consider the header to be kind of a title. To determine the page number at that point in processing, I think you have to set up fo:marker tags in the body to test with.

I think that generally, for Accessibility, the running headers/footer should be artifacted, as they should not be considered part of the content to be read out. Tagged PDF is about accessing the document content, not the page-numbers or running chapter titles or whatever that are on every page.

That's how I fixed it, if somebody else has a better solution, let us know.

Roger


was (Author: rpilkey):
I am just another user who has run into this, here's my explanation.

The purpose of the tags is to contain the content of the document.
 
I think you are probably using region-before and static-content to create what is called "running headers" or "running footers".
These running headers are visible on the page, but relative to the document content, they interrupt the content with repeated text.

I think you're supposed to create running headers in xsl-fo with <fo:static-content>

e.g.

 
{code:java}
<fo:region-before region-name="header0" extent="0.75cm"/>
<fo:static-content flow-name="header0">-->
  <fo:block>stuff</fo:block>
</fo:static-content>-->
{code}
 

which will repeat that content at the top of every page.

So FOP tags the visible text, but where do you put the tags? If you create tags where they appear on the pages, then they will interrupt the content. Think of a ten page table, it would not be correct to repeat a page header every 20 rows. The table contents should be uninterrupted. Also, I don't know if the processing even knows when it's at the top and bottom of a page at that point.
FOP doesn't throw away the text that is on every page, which would cause text with missing tags (fail), but it's all smooshed together in tags at the top and bottom as you've seen.

What I've tried:

1. manually go into the PDF after it's created and remove the extra tags. Ouch. But then you have visible text content that isn't tagged, and your accessibility checking software will complain.

2. move your content out of the static sections, repeating them in the <fo:region-body> loop. Then they will be read out on every page. If that's appropriate for your document.

3. look for places in your fo:static-content tags to insert this:
{code:java}
<fo:wrapper role="artifact">
 
</fo:wrapper>{code}
then those blocks won't be tagged.

You could artifact only on pages after page one if you consider the header to be kind of a title. To determine the page number at that point in processing, I think you have to set up fo:marker tags in the body to test with.

I think that generally, for Accessibility, the running headers/footer should be artifacted, as they should not be considered part of the content to be read out. Tagged PDF is about accessing the document content, not the page-numbers or running chapter titles or whatever that are on every page.

That's how I fixed it, if somebody else has a better solution, let us know.

Roger

> Common header and footer announced multiple times by screen reader
> ------------------------------------------------------------------
>
>                 Key: FOP-3011
>                 URL: https://issues.apache.org/jira/browse/FOP-3011
>             Project: FOP
>          Issue Type: Bug
>            Reporter: Elizabeth Whitmer
>            Priority: Major
>
> The PDFs we generate using Apache FOP have a common header and footer that appear on each page of the PDF. When testing these PDFs using JAWS 2021, we've found that JAWS will announce both the header and footer content multiple times depending on the number of pages in the PDF. For example, if the PDF has 3 pages, JAWS will announce the header content 3 times (once for each page), then read the remaining contents of the PDF, and then announce the footer content 3 times. This happens if the JAWS user tries to read the PDF line-by-line using the down arrow key and it also happens when we open the PDF and allow JAWS to read the PDF in "Say All" mode from top to bottom.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)