@@ -0,0 +1,3026 @@
+/*%0A * Tanaguru - Automated webpage assessment%0A * Copyright (C) 2008-2017  Tanaguru.org%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as%0A * published by the Free Software Foundation, either version 3 of the%0A * License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A *%0A * Contact us by mail: tanaguru AT tanaguru DOT org%0A */%0A%0Apackage org.tanaguru.rules.rgaa32017;%0A%0Aimport org.tanaguru.ruleimplementation.AbstractPageRuleWithSelectorAndCheckerImplementation;%0Aimport org.tanaguru.rules.elementchecker.pertinence.AttributePertinenceChecker;%0Aimport org.tanaguru.rules.elementselector.ImageElementSelector;%0Aimport static org.tanaguru.rules.keystore.AttributeStore.ALT_ATTR;%0Aimport static org.tanaguru.rules.keystore.AttributeStore.SRC_ATTR;%0Aimport static org.tanaguru.rules.keystore.CssLikeQueryStore.FORM_BUTTON_WITH_ALT_CSS_LIKE_QUERY;%0Aimport static org.tanaguru.rules.keystore.RemarkMessageStore.*;%0Aimport org.tanaguru.rules.textbuilder.TextAttributeOfElementBuilder;%0A%0A/**%0A * Implementation of the rule 1.3.3 of the referential Rgaa 3-2017.%0A * %3Cbr/%3E%0A * For more details about the implementation, refer to %3Ca href=%22http://tanaguru-rules-rgaa3.readthedocs.org/en/latest/Rule-1-3-3%22%3Ethe rule 1.3.3 design page.%3C/a%3E%0A * @see %3Ca href=%22http://references.modernisation.gouv.fr/referentiel-technique-0#test-1-3-3%22%3E 1.3.3 rule specification%3C/a%3E%0A *%0A */%0Apublic class Rgaa32017Rule010303 extends AbstractPageRuleWithSelectorAndCheckerImplementation %7B%0A%0A    /** The name of the nomenclature that handles the image file extensions */%0A    private static final String IMAGE_FILE_EXTENSION_NOM = %22ImageFileExtensions%22;%0A%0A    /**%0A     * Constructor%0A     */%0A    public Rgaa32017Rule010303() %7B%0A        super(%0A                new ImageElementSelector(FORM_BUTTON_WITH_ALT_CSS_LIKE_QUERY, true, false),%0A%0A                // checker for elements identified by marker%0A                new AttributePertinenceChecker(%0A                    ALT_ATTR,%0A                    // check emptiness%0A                    true,%0A                    // compare with src attribute%0A                    new TextAttributeOfElementBuilder(SRC_ATTR),%0A                    // compare attribute value with nomenclature%0A                    IMAGE_FILE_EXTENSION_NOM,%0A                    // not pertinent message%0A                    NOT_PERTINENT_ALT_MSG,%0A                    // manual check message%0A                    CHECK_ALT_PERTINENCE_OF_INFORMATIVE_IMG_MSG,%0A                    // evidence elemeents%0A                    ALT_ATTR, %0A                    SRC_ATTR)%0A            );%0A    %7D%0A    %0A%7D%0A

Add implementation rule Rgaa32017Rule010303