use of org.asqatasun.rules.elementchecker.CompositeChecker in project Asqatasun by Asqatasun.
the class Rgaa30Rule010202 method getMarkerElementChecker.
/**
*
* @return the checker user for marked elements
*/
private ElementChecker getMarkerElementChecker() {
CompositeChecker ec = new CompositeChecker(new TextEmptinessChecker(new TextAttributeOfElementBuilder(ALT_ATTR), new ImmutablePair(PASSED, ""), new ImmutablePair(FAILED, DECORATIVE_ELEMENT_WITH_NOT_EMPTY_ALT_MSG), ALT_ATTR, TITLE_ATTR), new AttributePresenceChecker(TITLE_ATTR, new ImmutablePair(FAILED, DECORATIVE_ELEMENT_WITH_TITLE_ATTR_MSG), new ImmutablePair(PASSED, ""), ALT_ATTR, TITLE_ATTR));
ec.setIsOrCombinaison(false);
return ec;
}
use of org.asqatasun.rules.elementchecker.CompositeChecker in project Asqatasun by Asqatasun.
the class Rgaa30Rule010201 method getMarkerElementChecker.
/**
*
* @return the checker user for marked elements
*/
private ElementChecker getMarkerElementChecker() {
CompositeChecker ec = new CompositeChecker(new TextEmptinessChecker(new TextAttributeOfElementBuilder(ALT_ATTR), new ImmutablePair(PASSED, ""), new ImmutablePair(FAILED, DECORATIVE_ELEMENT_WITH_NOT_EMPTY_ALT_MSG), ALT_ATTR, TITLE_ATTR, SRC_ATTR), new AttributePresenceChecker(TITLE_ATTR, new ImmutablePair(FAILED, DECORATIVE_ELEMENT_WITH_TITLE_ATTR_MSG), new ImmutablePair(PASSED, ""), ALT_ATTR, TITLE_ATTR, SRC_ATTR));
ec.setIsOrCombinaison(false);
return ec;
}
use of org.asqatasun.rules.elementchecker.CompositeChecker in project Asqatasun by Asqatasun.
the class Rgaa30Rule010301 method getMarkerElementChecker.
/**
*
* @return the checker user for marked elements
*/
private ElementChecker getMarkerElementChecker() {
CompositeChecker ec = new CompositeChecker(// checker for elements identified by marker
new AttributePertinenceChecker(ALT_ATTR, // check emptiness
true, // compare with src attribute
new TextAttributeOfElementBuilder(SRC_ATTR), // compare attribute value with nomenclature
IMAGE_FILE_EXTENSION_NOM, // not pertinent message
NOT_PERTINENT_ALT_MSG, // manual check message
CHECK_ALT_PERTINENCE_OF_INFORMATIVE_IMG_MSG, // evidence elements
ALT_ATTR, TITLE_ATTR, SRC_ATTR), new TextNotIdenticalToAttributeChecker(new TextAttributeOfElementBuilder(TITLE_ATTR), new TextAttributeOfElementBuilder(ALT_ATTR), new ImmutablePair(PASSED, ""), new ImmutablePair(FAILED, TITLE_NOT_IDENTICAL_TO_ALT_MSG), // evidence elements
ALT_ATTR, TITLE_ATTR, SRC_ATTR));
ec.setIsOrCombinaison(false);
return ec;
}
Aggregations