Skip to content

Commit

Permalink
Add WCAG2.2 Machine profile
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Dec 13, 2023
1 parent 8a603fc commit 9821404
Show file tree
Hide file tree
Showing 69 changed files with 1,802 additions and 348 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/update-PDFUA-profiles-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ on:
paths:
- 'PDF_UA/1/**'
- 'PDF_UA/2/**'
- 'PDF_UA/WCAG/PDF_UA/**'
- 'PDF_UA/WCAG-21.xml'
- 'PDF_UA/WCAG/**'

jobs:
update-profiles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
git-user: "Git User"
git-commit-message: ${{ github.event.head_commit.message }}
git-commit-sign-off: "false"
excludes: 1:2:WCAG:ISO-32000-1-Tagged.xml:ISO-32000-2-Tagged.xml:PDFUA-2-ISO32005.xml:ISO-32005-Tagged.xml:WCAG-21.xml:WCAG-21-Complete.xml:WCAG-21-Dev.xml:PDFA-1A.xml:PDFA-1B.xml:PDFA-2A.xml:PDFA-2B.xml:PDFA-2U.xml:PDFA-3A.xml:PDFA-3B.xml:PDFA-3U.xml:PDFA-4.xml:PDFA-4E.xml:PDFA-4F.xml:validationProfile.xsd
excludes: 1:2:WCAG:ISO-32000-1-Tagged.xml:ISO-32000-2-Tagged.xml:PDFUA-2-ISO32005.xml:ISO-32005-Tagged.xml:WCAG-22.xml:WCAG-22-Machine.xml:WCAG-22-Complete.xml:WCAG-22-Dev.xml:PDFA-1A.xml:PDFA-1B.xml:PDFA-2A.xml:PDFA-2B.xml:PDFA-2U.xml:PDFA-3A.xml:PDFA-3B.xml:PDFA-3U.xml:PDFA-4.xml:PDFA-4E.xml:PDFA-4F.xml:validationProfile.xsd

- name: Notify slack if library wasn't updated
if: failure()
Expand Down
132 changes: 66 additions & 66 deletions PDF_UA/WCAG-21-Complete.xml → PDF_UA/WCAG-22-Complete.xml

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions PDF_UA/WCAG-21-Dev.xml → PDF_UA/WCAG-22-Dev.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="WCAG2_1">
<profile xmlns="http://www.verapdf.org/ValidationProfile" flavour="WCAG2_2">
<details creator="veraPDF Consortium" created="2020-03-13T10:58:04.098+03:00">
<name>WCAG 2.1 development validation profile</name>
<description>Extra rules for WCAG 2.1 validation in addition to PDF/UA-1</description>
<name>WCAG 2.2 development validation profile</name>
<description>Extra rules for WCAG 2.2 validation in addition to PDF/UA-1</description>
</details>
<hash></hash>
<rules>
<rule object="SATextChunk">
<id specification="WCAG_2_1" clause="1.3.1" testNumber="5"/>
<id specification="WCAG_2_2" clause="1.3.1" testNumber="5"/>
<description>If text has a different background color, it shall be tagged as Span</description>
<test>hasSpecialBackground == false</test>
<error>
Expand All @@ -17,7 +17,7 @@
<references/>
</rule>
<rule object="SAP">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="1"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="1"/>
<description>The structure type and attributes of a paragraph shall be semantically appropriate</description>
<test>correctType == 'P' &amp;&amp; correctSemanticScore &gt;= 0.75</test>
<error>
Expand All @@ -30,7 +30,7 @@
<references/>
</rule>
<rule object="SASpan">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="2"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="2"/>
<description>The structure type and attributes of a span shall be semantically appropriate</description>
<test>correctType == 'Span' &amp;&amp; correctSemanticScore &gt;= 0.75</test>
<error>
Expand All @@ -43,7 +43,7 @@
<references/>
</rule>
<rule object="SATable">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="3"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="3"/>
<description>The structure type and attributes of a table shall be semantically appropriate</description>
<test>(correctType == 'Table' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -56,7 +56,7 @@
<references/>
</rule>
<rule object="SAH">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="4"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="4"/>
<description>The structure type and attributes of a heading shall be semantically appropriate</description>
<test>correctType == 'H' &amp;&amp; correctSemanticScore &gt;= 0.75</test>
<error>
Expand All @@ -69,7 +69,7 @@
<references/>
</rule>
<rule object="SAHn">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="5"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="5"/>
<description>The structure type and attributes of a numbered heading shall be semantically appropriate</description>
<test>correctType == 'Hn' &amp;&amp; correctSemanticScore &gt;= 0.75</test>
<error>
Expand All @@ -82,7 +82,7 @@
<references/>
</rule>
<rule object="SATR">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="6"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="6"/>
<description>The structure type and attributes of a table row shall be semantically appropriate</description>
<test>(correctType == 'TR' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -95,7 +95,7 @@
<references/>
</rule>
<rule object="SATH">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="7"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="7"/>
<description>The structure type and attributes of a table header cell shall be semantically appropriate</description>
<test>(correctType == 'TH' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -108,7 +108,7 @@
<references/>
</rule>
<rule object="SATD">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="8"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="8"/>
<description>The structure type and attributes of a table cell shall be semantically appropriate</description>
<test>(correctType == 'TD' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -121,7 +121,7 @@
<references/>
</rule>
<rule object="SAStructElem">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="9"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="9"/>
<description>The structure type and attributes of table elements shall be semantically appropriate</description>
<test>(correctSemanticScore &gt;= 0.75 &amp;&amp; standardType == correctType) || (correctType != 'TD' &amp;&amp;
correctType != 'TR' &amp;&amp; correctType != 'TH' &amp;&amp; correctType != 'TBody' &amp;&amp; correctType != 'THead' &amp;&amp;
Expand All @@ -137,7 +137,7 @@
<references/>
</rule>
<rule object="SACaption">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="11"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="11"/>
<description>The structure type and attributes of a caption shall be semantically appropriate</description>
<test>correctType == 'Caption' &amp;&amp; correctSemanticScore &gt;= 0.75</test>
<error>
Expand All @@ -150,7 +150,7 @@
<references/>
</rule>
<rule object="SAStructElem">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="12"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="12"/>
<description>The structure type and attributes of a caption shall be semantically appropriate</description>
<test>standardType == 'Caption' || correctType != 'Caption'</test>
<error>
Expand All @@ -163,7 +163,7 @@
<references/>
</rule>
<rule object="SAStructElem">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="13"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="13"/>
<description>The structure type and attributes of list elements shall be semantically appropriate</description>
<test>(correctSemanticScore &gt;= 0.75 &amp;&amp; standardType == correctType) || (correctType != 'L' &amp;&amp;
correctType != 'LI' &amp;&amp; correctType != 'Lbl' &amp;&amp; correctType != 'LBody')</test>
Expand All @@ -178,7 +178,7 @@
<references/>
</rule>
<rule object="SAL">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="14"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="14"/>
<description>The structure type and attributes of a list shall be semantically appropriate</description>
<test>(correctType == 'L' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -192,7 +192,7 @@
<references/>
</rule>
<rule object="SALI">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="15"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="15"/>
<description>The structure type and attributes of a list item shall be semantically appropriate</description>
<test>(correctType == 'LI' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -206,7 +206,7 @@
<references/>
</rule>
<rule object="SALbl">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="16"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="16"/>
<description>The structure type and attributes of a list label shall be semantically appropriate</description>
<test>(correctType == 'Lbl' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -220,7 +220,7 @@
<references/>
</rule>
<rule object="SALBody">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="17"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="17"/>
<description>The structure type and attributes of a list body shall be semantically appropriate</description>
<test>(correctType == 'LBody' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -234,7 +234,7 @@
<references/>
</rule>
<rule object="SAStructElem">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="18"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="18"/>
<description>A table element is incorrectly tagged as a list element or a list has the wrong numbering</description>
<test>(correctType != 'TD' &amp;&amp; correctType != 'TR' &amp;&amp; correctType != 'TH' &amp;&amp;
correctType != 'TBody' &amp;&amp; correctType != 'THead' &amp;&amp; correctType != 'TFoot' &amp;&amp;
Expand All @@ -251,7 +251,7 @@
<references/>
</rule>
<rule object="SALBody">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="19"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="19"/>
<description>List item does not contain a label</description>
<test>correctType != 'LI'</test>
<error>
Expand All @@ -265,7 +265,7 @@
<references/>
</rule>
<rule object="SATHead">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="21"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="21"/>
<description>The structure type and attributes of table headers shall be semantically appropriate</description>
<test>(correctType == 'THead' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -279,7 +279,7 @@
<references/>
</rule>
<rule object="SATBody">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="22"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="22"/>
<description>The structure type and attributes of a table body shall be semantically appropriate</description>
<test>(correctType == 'TBody' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -293,7 +293,7 @@
<references/>
</rule>
<rule object="SATFoot">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="23"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="23"/>
<description>The structure type and attributes of a table footer shall be semantically appropriate</description>
<test>(correctType == 'TFoot' &amp;&amp; correctSemanticScore &gt;= 0.75)</test>
<error>
Expand All @@ -307,7 +307,7 @@
<references/>
</rule>
<rule object="SALineArtChunk">
<id specification="WCAG_2_1" clause="4.1.2.1" testNumber="24"/>
<id specification="WCAG_2_2" clause="4.1.2.1" testNumber="24"/>
<description>line art</description>
<test>false</test>
<error>
Expand Down
Loading

0 comments on commit 9821404

Please sign in to comment.