Skip to content

Commit

Permalink
Merge pull request #624 from veraPDF/wcag2_2
Browse files Browse the repository at this point in the history
Add WCAG2.2 flavour
  • Loading branch information
MaximPlusov authored Dec 14, 2023
2 parents d357ac5 + 4210ab8 commit ec791e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ private static List<org.verapdf.model.pdlayer.PDDocument> getDocument() {
}

private List<org.verapdf.model.salayer.SAPDFDocument> getdocument() {
if (StaticContainers.getFlavour() == PDFAFlavour.WCAG2_1 &&
if (StaticContainers.getFlavour().getPart().getFamily() == PDFAFlavour.SpecificationFamily.WCAG &&
StaticResources.getDocument() != null && isPresent(GFSAPDFDOCUMENT_CLASS_NAME)) {
List<org.verapdf.model.salayer.SAPDFDocument> list = new ArrayList<>(MAX_NUMBER_OF_ELEMENTS);
list.add(new GFSAPDFDocument(StaticResources.getDocument()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private boolean hasStandardType(){
if (flavour.getPart() == PDFAFlavour.Specification.ISO_19005_4 || flavour == PDFAFlavour.PDFUA_2) {
return TaggedPDFHelper.isStandardType(type);
}
if (flavour.getPart() == PDFAFlavour.Specification.WCAG_2_1) {
if (flavour.getPart().getFamily() == PDFAFlavour.SpecificationFamily.WCAG) {
return TaggedPDFHelper.isWCAGStandardType(type) &&
!TaggedPDFConstants.TITLE.equals(type.getType().getValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected GFPDStructTreeNode(org.verapdf.pd.structure.PDStructTreeNode structTre
@Override
public String getkidsStandardTypes() {
if (StaticContainers.getFlavour() != null &&
StaticContainers.getFlavour().getPart() == PDFAFlavour.Specification.WCAG_2_1) {
StaticContainers.getFlavour().getPart().getFamily() == PDFAFlavour.SpecificationFamily.WCAG) {
return this.getChildrenStandardTypes()
.stream()
.filter(type -> type != null && !TaggedPDFConstants.ARTIFACT.equals(type))
Expand Down

0 comments on commit ec791e2

Please sign in to comment.