Skip to content

Commit

Permalink
Merge pull request #374 from veraPDF/wcag_tags
Browse files Browse the repository at this point in the history
WCAG. Update tags
  • Loading branch information
MaximPlusov authored Nov 6, 2023
2 parents ec6dfaa + 35bcbfb commit 1aa2853
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions PDF_UA/WCAG-21-Complete.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</error>
<references/>
</rule>
<rule object="PDPage" tags="minor,machine,syntax,page">
<rule object="PDPage" tags="minor,machine,page">
<id specification="WCAG_2_1" clause="1.3.4" testNumber="1"/>
<description>Pages shall have the same orientation</description>
<test>orientation == 'Square' || gMostCommonPageOrientation == orientation</test>
Expand Down Expand Up @@ -911,7 +911,7 @@
</error>
<references/>
</rule>
<rule object="SEMarkedContent" tags="major,machine,syntax,content">
<rule object="SEMarkedContent" tags="major,machine,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 || isArtifact == true)</test>
Expand All @@ -923,7 +923,7 @@
</error>
<references/>
</rule>
<rule object="SEMarkedContent" tags="major,machine,syntax,content">
<rule object="SEMarkedContent" tags="major,machine,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 || isArtifact == true) || parentsTags.split('&amp;').filter(elem =&gt; elem == 'Artifact').length == 0</test>
Expand All @@ -935,7 +935,7 @@
</error>
<references/>
</rule>
<rule object="SESimpleContentItem" tags="critical,machine,syntax,content">
<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>
Expand Down Expand Up @@ -1054,7 +1054,7 @@
<reference specification="ISO 32000-1:2008" clause="14.7"/>
</references>
</rule>
<rule object="PDOutline" tags="critical,machine,syntax,lang">
<rule object="PDOutline" tags="critical,machine,lang">
<id specification="ISO_14289_1" clause="7.2" testNumber="2"/>
<description>Natural language in the Outline entries shall be determined</description>
<test>gSizeCatalogLang != 0</test>
Expand Down Expand Up @@ -1455,7 +1455,7 @@
<reference specification="ISO 32000-1:2008" clause="14.8.4.2"/>
</references>
</rule>
<rule object="CosLang" tags="critical,machine,syntax,lang">
<rule object="CosLang" tags="critical,machine,lang">
<id specification="ISO_14289_1" clause="7.2" testNumber="29"/>
<description>If the Lang entry is present in the document's Catalog dictionary or in a structure element dictionary or
property list, its value shall be a language identifier as described in ISO 32000-1:2008, 14.9.2.
Expand All @@ -1472,7 +1472,7 @@
<reference specification="RFC 3066" clause="2.1"/>
</references>
</rule>
<rule object="SEMarkedContent" tags="major,machine,syntax,content,lang,alt-text">
<rule object="SEMarkedContent" tags="major,machine,lang,alt-text">
<id specification="ISO_14289_1" clause="7.2" testNumber="30"/>
<description>Natural language for text in ActualText attribute in Span Marked Content shall be determined</description>
<test>tag != 'Span' || ActualText == null || Lang_size != 0 || inheritedLang != null || gSizeCatalogLang != 0</test>
Expand All @@ -1482,7 +1482,7 @@
</error>
<references/>
</rule>
<rule object="SEMarkedContent" tags="major,machine,syntax,content,lang,alt-text">
<rule object="SEMarkedContent" tags="major,machine,lang,alt-text">
<id specification="ISO_14289_1" clause="7.2" testNumber="31"/>
<description>Natural language for text in Alt attribute in Span Marked Content shall be determined</description>
<test>tag != 'Span' || Alt == null || Lang_size != 0 || inheritedLang != null || gSizeCatalogLang != 0</test>
Expand All @@ -1492,7 +1492,7 @@
</error>
<references/>
</rule>
<rule object="SEMarkedContent" tags="major,machine,syntax,content,lang,alt-text">
<rule object="SEMarkedContent" tags="major,machine,lang,alt-text">
<id specification="ISO_14289_1" clause="7.2" testNumber="32"/>
<description>Natural language for text in E attribute in Span Marked Content shall be determined</description>
<test>tag != 'Span' || E == null || Lang_size != 0 || inheritedLang != null || gSizeCatalogLang != 0</test>
Expand All @@ -1512,7 +1512,7 @@
</error>
<references/>
</rule>
<rule object="SETextItem" tags="major,machine,syntax,lang,text">
<rule object="SETextItem" tags="major,machine,lang,text">
<id specification="ISO_14289_1" clause="7.2" testNumber="34"/>
<description>Natural language for text in page content shall be determined</description>
<test>gSizeCatalogLang != 0 || Lang != null</test>
Expand Down Expand Up @@ -1839,7 +1839,7 @@
<reference specification="ISO 32000-1:2008" clause="7.6.3.2"/>
</references>
</rule>
<rule object="PDAnnot" tags="major,machine,syntax,annotation">
<rule object="PDAnnot" tags="major,machine,annotation">
<id specification="ISO_14289_1" clause="7.18.1" testNumber="1"/>
<description>An annotation, excluding annotations of subtype Widget, Popup or Link, shall be nested within an Annot tag</description>
<test>Subtype == 'Widget' || Subtype == 'Popup' || Subtype == 'Link' || isOutsideCropBox == true ||
Expand All @@ -1854,7 +1854,7 @@
</error>
<references/>
</rule>
<rule object="PDAnnot" tags="major,machine,syntax,annotation,alt-text">
<rule object="PDAnnot" tags="major,machine,annotation,alt-text">
<id specification="ISO_14289_1" clause="7.18.1" testNumber="2"/>
<description>An annotation (except annotations of type Link, Widget or Popup, or hidden annotations,
or those having rectangle outside the crop-box) shall have either Contents key or an Alt entry
Expand All @@ -1871,7 +1871,7 @@
</error>
<references/>
</rule>
<rule object="PDWidgetAnnot" tags="major,machine,syntax,annotation,alt-text">
<rule object="PDWidgetAnnot" tags="major,machine,annotation,alt-text">
<id specification="ISO_14289_1" clause="7.18.1" testNumber="3"/>
<description>A form field whose hidden flag is not set and whose rectangle is not outside the crop-box
shall have a TU key present or all its Widget annotations shall have alternative descriptions
Expand All @@ -1885,7 +1885,7 @@
</error>
<references/>
</rule>
<rule object="PDTrapNetAnnot" tags="major,machine,syntax,annotation">
<rule object="PDTrapNetAnnot" tags="major,machine,annotation">
<id specification="ISO_14289_1" clause="7.18.2" testNumber="1"/>
<description>Annotations of subtype TrapNet shall not be permitted.</description>
<test>isOutsideCropBox == true || (F &amp; 2) == 2</test>
Expand All @@ -1895,7 +1895,7 @@
</error>
<references/>
</rule>
<rule object="PDPage" tags="minor,machine,syntax,page">
<rule object="PDPage" tags="minor,machine,page">
<id specification="ISO_14289_1" clause="7.18.3" testNumber="1"/>
<description>Every page on which there is an annotation shall contain in its page dictionary the key Tabs, and its value shall be S.</description>
<test>annots_size == 0 || Tabs == 'S'</test>
Expand All @@ -1907,7 +1907,7 @@
</error>
<references/>
</rule>
<rule object="PDWidgetAnnot" tags="major,machine,syntax,annotation">
<rule object="PDWidgetAnnot" tags="major,machine,annotation">
<id specification="ISO_14289_1" clause="7.18.4" testNumber="1"/>
<description>A Widget annotation shall be nested within a Form tag per ISO 32000-1:2008, 14.8.4.5, Table 340.</description>
<test>structParentStandardType == 'Form' || isOutsideCropBox == true || (F &amp; 2) == 2</test>
Expand Down Expand Up @@ -1936,7 +1936,7 @@
<reference specification="ISO 32000-1:2008" clause="14.8.4.5"/>
</references>
</rule>
<rule object="PDLinkAnnot" tags="major,machine,syntax,annotation">
<rule object="PDLinkAnnot" tags="major,machine,annotation">
<id specification="ISO_14289_1" clause="7.18.5" testNumber="1"/>
<description>Links shall be tagged according to ISO 32000-1:2008, 14.8.4.4.2, Link Element.</description>
<test>structParentStandardType == 'Link' || structParentStandardType == 'Reference' ||
Expand Down Expand Up @@ -1980,7 +1980,7 @@
<reference specification="ISO 32000-1:2008" clause="13.2.4.2"/>
</references>
</rule>
<rule object="PDPrinterMarkAnnot" tags="major,machine,syntax,annotation">
<rule object="PDPrinterMarkAnnot" tags="major,machine,annotation">
<id specification="ISO_14289_1" clause="7.18.8" testNumber="1"/>
<description>PrinterMark annotations, if present, shall be considered Incidental Artifacts, as if they are hidden page
elements as defined in ISO 32000-1:2008, 14.8.2.2.3.</description>
Expand Down Expand Up @@ -2016,7 +2016,7 @@
<reference specification="ISO 32000-1:2008" clause="14.7.2"/>
</references>
</rule>
<rule object="PDType0Font" tags="major,machine,syntax,font">
<rule object="PDType0Font" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.3.1" testNumber="1"/>
<description>For any given composite (Type 0) font within a conforming file, the CIDSystemInfo entry in its CIDFont dictionary and its Encoding dictionary
shall have the following relationship:
Expand All @@ -2042,7 +2042,7 @@
</error>
<references/>
</rule>
<rule object="PDCIDFont" tags="major,machine,syntax,font">
<rule object="PDCIDFont" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.3.2" testNumber="1"/>
<description>ISO 32000-1:2008, 9.7.4, Table 117 requires that all embedded Type 2 CIDFonts in the CIDFont dictionary shall contain a
CIDToGIDMap entry that shall be a stream mapping from CIDs to glyph indices or the name Identity, as described in ISO 32000-1:2008, 9.7.4, Table 117.</description>
Expand All @@ -2055,7 +2055,7 @@
<reference specification="ISO 32000-1:2008" clause="9.7.4, Table 117"/>
</references>
</rule>
<rule object="PDCMap" tags="major,machine,syntax,font">
<rule object="PDCMap" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.3.3" testNumber="1"/>
<description>All CMaps used within a PDF/UA file, except those listed in ISO 32000-1:2008, 9.7.5.2, Table 118, shall be embedded in that file as described
in ISO 32000-1:2008, 9.7.5.</description>
Expand Down Expand Up @@ -2085,7 +2085,7 @@
<reference specification="ISO 32000-1:2008" clause="9.7.5.2, Table 118"/>
</references>
</rule>
<rule object="CMapFile" tags="major,machine,syntax,font">
<rule object="CMapFile" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.3.3" testNumber="2"/>
<description>For those CMaps that are embedded, the integer value of the WMode entry in the CMap dictionary shall be identical to the WMode value
in the embedded CMap stream.</description>
Expand All @@ -2099,7 +2099,7 @@
</error>
<references/>
</rule>
<rule object="PDReferencedCMap" tags="major,machine,syntax,font">
<rule object="PDReferencedCMap" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.3.3" testNumber="3"/>
<description>A CMap shall not reference any other CMap except those listed in ISO 32000-1:2008, 9.7.5.2, Table 118.</description>
<test>CMapName == "Identity-H" || CMapName == "Identity-V" || CMapName == "GB-EUC-H" || CMapName == "GB-EUC-V" ||
Expand Down Expand Up @@ -2128,7 +2128,7 @@
<reference specification="ISO 32000-1:2008" clause="9.7.5.2, Table 118"/>
</references>
</rule>
<rule object="PDFont" tags="major,machine,syntax,font">
<rule object="PDFont" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.4.1" testNumber="1"/>
<description>The font programs for all fonts used for rendering within a conforming file shall be embedded within that file, as defined in ISO 32000-1:2008, 9.9.</description>
<test>Subtype == "Type3" || Subtype == "Type0" || renderingMode == 3 || fontFile_size == 1</test>
Expand All @@ -2140,7 +2140,7 @@
<reference specification="ISO 32000-1:2008" clause="9.9"/>
</references>
</rule>
<rule object="Glyph" tags="major,machine,syntax,font">
<rule object="Glyph" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.4.1" testNumber="2"/>
<description>Embedded fonts shall define all glyphs referenced for rendering within the conforming file.
A font referenced solely in text rendering mode 3 is not rendered and is thus exempt from the requirements
Expand All @@ -2157,7 +2157,7 @@
<reference specification="ISO 32000-1:2008" clause="9.6.6.4"/>
</references>
</rule>
<rule object="PDType1Font" tags="minor,machine,syntax,font">
<rule object="PDType1Font" tags="minor,machine,font">
<id specification="ISO_14289_1" clause="7.21.4.2" testNumber="1"/>
<description>If the FontDescriptor dictionary of an embedded Type 1 font contains a CharSet string, then it shall list the character names of all glyphs
present in the font program, regardless of whether a glyph in the font is referenced or used by the PDF or not.</description>
Expand All @@ -2168,7 +2168,7 @@
</error>
<references/>
</rule>
<rule object="PDCIDFont" tags="minor,machine,syntax,font">
<rule object="PDCIDFont" tags="minor,machine,font">
<id specification="ISO_14289_1" clause="7.21.4.2" testNumber="2"/>
<description>If the FontDescriptor dictionary of an embedded CID font contains a CIDSet stream, then it shall identify all CIDs which are present in the font program,
regardless of whether a CID in the font is referenced or used by the PDF or not.</description>
Expand All @@ -2179,7 +2179,7 @@
</error>
<references/>
</rule>
<rule object="Glyph" tags="major,machine,syntax,font">
<rule object="Glyph" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.5" testNumber="1"/>
<description>For every font embedded in a conforming file and used for rendering, the glyph width information in the font dictionary and in the embedded
font program shall be consistent.</description>
Expand All @@ -2194,7 +2194,7 @@
</error>
<references/>
</rule>
<rule object="TrueTypeFontProgram" tags="major,machine,syntax,font">
<rule object="TrueTypeFontProgram" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.6" testNumber="1"/>
<description>For all non-symbolic TrueType fonts used for rendering, the embedded TrueType font program shall contain one or several non-symbolic
cmap entries such that all necessary glyph lookups can be carried out.</description>
Expand All @@ -2205,7 +2205,7 @@
</error>
<references/>
</rule>
<rule object="PDTrueTypeFont" tags="major,machine,syntax,font">
<rule object="PDTrueTypeFont" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.6" testNumber="2"/>
<description>No non-symbolic TrueType font shall define a Differences array unless all of the glyph names in
the Differences array are listed in the Adobe Glyph List and the embedded font program contains at least the
Expand All @@ -2223,7 +2223,7 @@
</error>
<references/>
</rule>
<rule object="PDTrueTypeFont" tags="major,machine,syntax,font">
<rule object="PDTrueTypeFont" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.6" testNumber="3"/>
<description>Symbolic TrueType fonts shall not contain an Encoding entry in the font dictionary</description>
<test>isSymbolic == false || Encoding == null</test>
Expand All @@ -2233,7 +2233,7 @@
</error>
<references/>
</rule>
<rule object="TrueTypeFontProgram" tags="major,machine,syntax,font">
<rule object="TrueTypeFontProgram" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.6" testNumber="4"/>
<description>The 'cmap' table in the embedded font program for a symbolic TrueType font shall contain either
exactly one encoding or it shall contain, at least, the Microsoft Symbol (3,0 - Platform ID=3,
Expand All @@ -2248,7 +2248,7 @@
</error>
<references/>
</rule>
<rule object="Glyph" tags="critical,machine,syntax,font">
<rule object="Glyph" tags="critical,machine,font">
<id specification="ISO_14289_1" clause="7.21.7" testNumber="1"/>
<description>The Font dictionary of all fonts shall define the map of all used character codes to Unicode values, either via a ToUnicode entry,
or other mechanisms as defined in ISO 14289-1, 7.21.7.</description>
Expand All @@ -2261,7 +2261,7 @@
<reference specification="ISO 14289-1:2014" clause="7.21.7"/>
</references>
</rule>
<rule object="Glyph" tags="critical,machine,syntax,font">
<rule object="Glyph" tags="critical,machine,font">
<id specification="ISO_14289_1" clause="7.21.7" testNumber="2"/>
<description>The Unicode values specified in the ToUnicode CMap shall all be greater than zero (0), but not equal to either U+FEFF or U+FFFE.</description>
<test>toUnicode == null || (toUnicode.indexOf("\u0000") == -1 &amp;&amp; toUnicode.indexOf("\uFFFE") == -1 &amp;&amp; toUnicode.indexOf("\uFEFF") == -1)</test>
Expand All @@ -2271,7 +2271,7 @@
</error>
<references/>
</rule>
<rule object="Glyph" tags="major,machine,syntax,font">
<rule object="Glyph" tags="major,machine,font">
<id specification="ISO_14289_1" clause="7.21.8" testNumber="1"/>
<description>A PDF/UA compliant document shall not contain a reference to the .notdef glyph from any of the text showing
operators, regardless of text rendering mode, in any content stream.</description>
Expand Down

0 comments on commit 1aa2853

Please sign in to comment.