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

WCAG 1.3.1 test 2 too strict? #225

Open
jzuidweg opened this issue Jul 14, 2022 · 3 comments
Open

WCAG 1.3.1 test 2 too strict? #225

jzuidweg opened this issue Jul 14, 2022 · 3 comments
Labels
invalid This doesn't seem right

Comments

@jzuidweg
Copy link

Test document 2 fails WCAG 1.3.1 test 2 (Space characters are used for formatting purpose). This is technically correct. There are no false positives: the test correctly identifies places where spaces have no function and line breaks are used to create vertical space.

However, you dould argue that it's a bit over the top to generate an error for a single or double space directly after a full stop. It's true that this is bad practice, but it generates a lot of errors which are not considered very important by people who use screen readers (which usually ignore spaces after a full stop).

My proposal for implementing this test would be:

  • Ignore single or double spaces directly after a full stop. Do not generate an error in this case.
  • Generate errors for 3 or more consecutive spaces.
  • Generate errors for repeated line breaks following empty lines, or lines with only spaces.
@bdoubrov
Copy link
Collaborator

We already generate errors only if there are 3 or more repeated spaces. This would cover the first two bullet points.

Line breaks and empty lines normally do not normally appear in PDF content or structure. What can be detected additionally:

  • paragraphs (in fact any structure elements) that contain only spaces (even 1 or 2)
  • abnormally large vertical spacing between text lines

@jzuidweg
Copy link
Author

Thanks for the answer, this sounds good. My question is: why does the algorithm still seem to point to single spaces after a line end with full stop ('. ')? This appears to occur in test document 2.

@irinamavrina
Copy link
Contributor

irinamavrina commented Jul 28, 2022

@jzuidweg Hi, let me answer your question)
The single spaces you're referring to, are not actually single (they look like big single spaces, but if you look at another case with repeating spaces you'll see, that actual single spaces are narrower than spaces in question), so really there are 3 successive spaces and that's why algorithm points to them.

@bdoubrov bdoubrov added the invalid This doesn't seem right label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants