danfickle / danfickle/openhtmltopdf

Ordering of elements for PDF accessibility and screenreaders

Open
#808 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.2k
Forks
423
PR merge metrics
No merged PRs in 30d

Description

Hi,

I've been trying to create an accessible PDF, that has a left and right column and some text below. Everything works as expected and the accessibility-checker that I use finds no errors, but the order of the elements is not the same as in the document. The div-elements change order, when I access them in a screenreader, so the order of the text gets lost.

HTML und CSS:

```

.container {
width: 100%;
}
.left {
float:left;
width: 13cm;
height: 23cm;
}
.right {
float:right;
height: 23cm;
}
.left_complete{
float:left;
width: 17cm;
height: 23cm;
}




Left text.


Right text.



Text below.

```

The HTML correctly shown in a browser:

![html view](https://user-images.githubusercontent.com/339414/155983014-363702f9-801c-4e62-970e-28a19c60827c.png)

The wrong order in a screenreader, text below shows first:
![screenreader ordering](https://user-images.githubusercontent.com/339414/155982803-a0476943-ea0d-4467-abdd-a497767d45fc.png)

I'd appreciate any help or direction what to do, to get the correct order in a screenreader.

Thanks alot!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.