Skip to content

Commit

Permalink
PDF/UA. Update rules about tagged content
Browse files Browse the repository at this point in the history
PDF/UA-1(7.1-1 - 7.1-2), PDF/UA-2(8.2.2-1, 8.5.1-1)
  • Loading branch information
MaximPlusov authored and github-actions[bot] committed Dec 27, 2023
1 parent 5e46b51 commit bfefc3d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions PDF_UA/PDFUA-1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,31 +67,31 @@
<rule object="SEMarkedContent" tags="artifact">
<id specification="ISO_14289_1" clause="7.1" testNumber="1"/>
<description>Content marked as Artifact should not present inside tagged content</description>
<test>tag != 'Artifact' || parentStructureTag == null</test>
<test>tag != 'Artifact' || isTaggedContent == false</test>
<error>
<message>Content marked as Artifact is present inside tagged content (tag %1)</message>
<message>Content marked as Artifact is present inside tagged content (parent struct element %1)</message>
<arguments>
<argument>parentStructureTag</argument>
<argument>parentStructureElementObjectKey</argument>
</arguments>
</error>
<references/>
</rule>
<rule object="SEMarkedContent" tags="artifact">
<id specification="ISO_14289_1" clause="7.1" testNumber="2"/>
<description>Tagged content should not present inside content marked as Artifact</description>
<test>parentStructureTag == null || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length == 0</test>
<test>isTaggedContent == false || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length == 0</test>
<error>
<message>Tagged content (tag %1) is present inside content marked as Artifact</message>
<message>Tagged content (parent struct element %1) is present inside content marked as Artifact</message>
<arguments>
<argument>parentStructureTag</argument>
<argument>parentStructureElementObjectKey</argument>
</arguments>
</error>
<references/>
</rule>
<rule object="SESimpleContentItem" tags="artifact">
<id specification="ISO_14289_1" clause="7.1" testNumber="3"/>
<description>Content shall be marked as Artifact or tagged as real content</description>
<test>parentStructureTag != null || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<test>isTaggedContent == true || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<error>
<message>Content is neither marked as Artifact nor tagged as real content</message>
<arguments/>
Expand Down
10 changes: 5 additions & 5 deletions PDF_UA/PDFUA-2-ISO32005.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<rule object="SESimpleContentItem">
<id specification="ISO_14289_2" clause="8.2.2" testNumber="1"/>
<description>Content that is not considered real shall be an artifact</description>
<test>parentStructureTag != null || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<test>isTaggedContent == true || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<error>
<message>Content is neither marked as Artifact nor tagged as real content</message>
<arguments/>
Expand Down Expand Up @@ -438,17 +438,17 @@
<description>The ActualText entry shall not contain any PUA values</description>
<test>containsPUA == false</test>
<error>
<message>The ActualText entry contains a Private Unicoide Area value</message>
<message>The ActualText entry contains a Private Unicode Area value</message>
<arguments/>
</error>
<references/>
</rule>
<rule object="CosActualText">
<rule object="CosAlt">
<id specification="ISO_14289_2" clause="8.4.3" testNumber="3"/>
<description>The Alt entry shall not contain any PUA values</description>
<test>containsPUA == false</test>
<error>
<message>The Alt entry contains a Private Unicoide Area value</message>
<message>The Alt entry contains a Private Unicode Area value</message>
<arguments/>
</error>
<references/>
Expand Down Expand Up @@ -668,7 +668,7 @@
<rule object="SESimpleContentItem">
<id specification="ISO_14289_2" clause="8.5.1" testNumber="1"/>
<description>Real content that does not possess the semantics of text objects and does not have an alternate textual representation shall be enclosed within Figure or Formula structure elements as appropriate</description>
<test>itemType == 'text' || parentStructureTag == null || ActualText != null || isArtifact == true || isFigure == true || isFormula == true</test>
<test>itemType == 'text' || isTaggedContent == false || ActualText != null || isArtifact == true || isFigure == true || isFormula == true</test>
<error>
<message>Real content that does not possess the semantics of text objects and does not have an alternate textual representation is not enclosed within Figure or Formula structure elements</message>
<arguments/>
Expand Down
10 changes: 5 additions & 5 deletions PDF_UA/PDFUA-2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<rule object="SESimpleContentItem">
<id specification="ISO_14289_2" clause="8.2.2" testNumber="1"/>
<description>Content that is not considered real shall be an artifact</description>
<test>parentStructureTag != null || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<test>isTaggedContent == true || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<error>
<message>Content is neither marked as Artifact nor tagged as real content</message>
<arguments/>
Expand Down Expand Up @@ -438,17 +438,17 @@
<description>The ActualText entry shall not contain any PUA values</description>
<test>containsPUA == false</test>
<error>
<message>The ActualText entry contains a Private Unicoide Area value</message>
<message>The ActualText entry contains a Private Unicode Area value</message>
<arguments/>
</error>
<references/>
</rule>
<rule object="CosActualText">
<rule object="CosAlt">
<id specification="ISO_14289_2" clause="8.4.3" testNumber="3"/>
<description>The Alt entry shall not contain any PUA values</description>
<test>containsPUA == false</test>
<error>
<message>The Alt entry contains a Private Unicoide Area value</message>
<message>The Alt entry contains a Private Unicode Area value</message>
<arguments/>
</error>
<references/>
Expand Down Expand Up @@ -668,7 +668,7 @@
<rule object="SESimpleContentItem">
<id specification="ISO_14289_2" clause="8.5.1" testNumber="1"/>
<description>Real content that does not possess the semantics of text objects and does not have an alternate textual representation shall be enclosed within Figure or Formula structure elements as appropriate</description>
<test>itemType == 'text' || parentStructureTag == null || ActualText != null || isArtifact == true || isFigure == true || isFormula == true</test>
<test>itemType == 'text' || isTaggedContent == false || ActualText != null || isArtifact == true || isFigure == true || isFormula == true</test>
<error>
<message>Real content that does not possess the semantics of text objects and does not have an alternate textual representation is not enclosed within Figure or Formula structure elements</message>
<arguments/>
Expand Down
2 changes: 1 addition & 1 deletion PDF_UA/WCAG-2-2-Complete.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<rule object="SESimpleContentItem" tags="critical,machine,artifact">
<id specification="ISO_14289_1" clause="7.1" testNumber="3"/>
<description>Content shall be marked as Artifact or tagged as real content</description>
<test>parentStructureTag != null || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<test>isTaggedContent == true || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<error>
<message>Content is neither marked as Artifact nor tagged as real content</message>
<arguments/>
Expand Down
2 changes: 1 addition & 1 deletion PDF_UA/WCAG-2-2-Machine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<rule object="SESimpleContentItem" tags="critical,machine,artifact">
<id specification="ISO_14289_1" clause="7.1" testNumber="3"/>
<description>Content shall be marked as Artifact or tagged as real content</description>
<test>parentStructureTag != null || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<test>isTaggedContent == true || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length &gt; 0</test>
<error>
<message>Content is neither marked as Artifact nor tagged as real content</message>
<arguments/>
Expand Down

0 comments on commit bfefc3d

Please sign in to comment.