Skip to content

v0.2.2

Choose a tag to compare

@github-actions github-actions released this 28 Sep 00:25
· 67 commits to main since this release

Figures in the tagged reading now show their own picture, and the notice under a figure says what is actually known about it.

What changes for a reader

These apply to PDF の構造タグ (the tagged reading), and to the combined reading built on it.

  • Each figure shows its own part of the page. Many PDFs wrap each figure in a page-sized clip. Both InDesign and PowerPoint exports do this, and it is ordinary, valid PDF. The Reader counted that clip as part of the figure, so it showed the whole page in the figure's place, repeated once for every such figure. Measured on two documents: in a flyer, 6 of 14 figures showed the whole page; in a PowerPoint-exported notice, 6 of 29. Neither has any now. (#12)

  • A figure no longer shows another figure's picture. A tagged figure too small to crop could be matched by drawing order to an image nearby. Two small icons in the flyer showed two logos, and in the notice a thin rule and a small piece of lettering showed two other pictures. They now keep their notice instead.

  • A picture drawn larger than its frame is cropped to the frame. A code in the flyer is drawn as a large square cut down by its frame. Its crop ran 80pt below the page and was mostly empty; it is now the visible frame.

  • The notice under a figure without alternative text says what is known. It used to be 「画像があります。代替テキストを取得できませんでした。」 for every such figure. In the tagged reading:

    • an image with no /Alt: 「画像があります。作成者による代替テキストはありません。」
    • a figure too small to crop, which shows no image: 「図としてタグ付けされていますが、小さいため画像は表示していません。作成者による代替テキストはありません。」
    • an empty /Alt (), the author marking the figure decorative: 「装飾的な画像です。内容はありません。」 It is no longer offered for an AI description.

    The inferred reading cannot see /Alt, so it keeps the old sentence, which is accurate there. (#14)

Not changed yet

  • A figure under 24pt on a side is still not shown as an image. In the flyer that is six icons, all with the author's alternative text. Where to draw that line is #15.
  • An author's alternative text is read by screen readers but not drawn on screen or in print when the image is shown. #17.

Under the hood

  • The figure locator now follows clipping through saving and restoring the graphics state and through form XObjects. It measures against the page's own box, so a page turned with /Rotate or with a crop box away from the corner is measured in the right place.

Pull requests: #13, #16.


日本語

構造タグの読み取りで、図がそれぞれ自分の画像を表示するようになりました。図の下のメッセージも、分かっていることをそのまま伝えるようにしました。

以下は「PDF の構造タグ」と、それをもとにした「構造タグ+推測した見出し」の読み取りでの変更です。

  • 図ごとに、その図の部分だけを表示します。 多くの PDF では、図がページと同じ大きさの「クリップ」で囲まれています。InDesign や PowerPoint で書き出した PDF もそうで、規格どおりの普通の作りです。これを図の一部として数えていたため、図の場所にページ全体の画像が図の数だけ繰り返し表示されていました。2 つの文書で測ったところ、ページ全体が表示されていたのは、フライヤーで 14 件中 6 件、PowerPoint で書き出したお知らせで 29 件中 6 件でした。どちらも今は 0 件です。(#12)

  • ほかの図の画像を表示しなくなりました。 切り出すには小さすぎる図に、描かれた順番で近くの画像が割り当てられることがありました。フライヤーでは小さなアイコン 2 件に 2 つのロゴが、お知らせでは細い線と小さな文字の 2 件に別の画像が表示されていました。今はメッセージのみを表示します。

  • 枠より大きく描かれた図は、枠の大きさで切り出します。 フライヤーのコードは、大きな四角形を枠で切り抜いて描かれています。これまでは切り出し範囲がページの下 80pt まで広がって大半が空白でしたが、今は見えている枠の大きさで表示します。

  • 代替テキストのない図のメッセージを、分かっていることに合わせました。 これまでは一律に「画像があります。代替テキストを取得できませんでした。」でした。構造タグの読み取りでは次のようになります。

    • /Alt のない画像:「画像があります。作成者による代替テキストはありません。」
    • 小さすぎて画像を表示しない図:「図としてタグ付けされていますが、小さいため画像は表示していません。作成者による代替テキストはありません。」
    • 作成者が空の /Alt () で装飾と指定した図:「装飾的な画像です。内容はありません。」 AI による説明の対象にもなりません。

    レイアウトからの推測では /Alt を読めないため、これまでの文言のままです。そちらでは事実どおりの文です。(#14)

まだ変えていないこと:

  • 縦か横が 24pt に満たない図は、今も画像を表示しません。フライヤーでは 6 件のアイコンが該当し、どれも作成者の代替テキストがあります。基準の見直しは #15 で検討します。
  • 画像を表示している図の作成者の代替テキストは、スクリーンリーダーでは読み上げられますが、画面や印刷には出ません。#17 で検討します。