False positives
WCAG 1.3.1 test 4 ("Text has a different style but no semantic tagging") generates errors for almost all formatted text, which is probably too sensitive.
Examples:
False negatives
In test document 3, the algorithm should probably call out the texts which have been highlighted in yellow, but it doesn't.
About this test
This is probably a very difficult test to implement because formatting text is in itself not prohibited by WCAG 2.1. It becomes a problem when the document contains information that is represented only by formatting.
Example: for the following text the algorithm should generate errors, because italics are used to convey real information that cannot be seen in any other way:
In the following paragraph, verbs are marked in italics: Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.
Example: for the following text the algorithm should not generate errors, because italics are only used to emphasize text, but not for conveying new information:
The first amendment: Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.
It's very difficult for an algorithm to distinguish between these cases, because it has to work out whether the formatting is used to convey new information that is not otherwise visible. This probably requires AI, which is out of the scope of this issue. But perhaps as a patch we can use a few simple heuristic rules:
- Boldface and italics are mostly used for just emphasizing text, so we should probably not generate errors for this.
- List bullets should not generate errors.
- Table cells which are empty but have a different background colour should generate errors, because there is a big chance that colours of empty table cells are used to convey information.
- Highlighted text (such as in test document 3) and coloured text should generate errors because colouring is (as far as I know) not read out by screen readers.
False positives
WCAG 1.3.1 test 4 ("Text has a different style but no semantic tagging") generates errors for almost all formatted text, which is probably too sensitive.
Examples:
False negatives
In test document 3, the algorithm should probably call out the texts which have been highlighted in yellow, but it doesn't.
About this test
This is probably a very difficult test to implement because formatting text is in itself not prohibited by WCAG 2.1. It becomes a problem when the document contains information that is represented only by formatting.
Example: for the following text the algorithm should generate errors, because italics are used to convey real information that cannot be seen in any other way:
Example: for the following text the algorithm should not generate errors, because italics are only used to emphasize text, but not for conveying new information:
It's very difficult for an algorithm to distinguish between these cases, because it has to work out whether the formatting is used to convey new information that is not otherwise visible. This probably requires AI, which is out of the scope of this issue. But perhaps as a patch we can use a few simple heuristic rules: