diff --git a/admin/tool/brickfield/classes/local/htmlchecker/common/checks/img_alt_is_too_long.php b/admin/tool/brickfield/classes/local/htmlchecker/common/checks/img_alt_is_too_long.php index 2e0f1ad172b..21e2c2ce4b5 100644 --- a/admin/tool/brickfield/classes/local/htmlchecker/common/checks/img_alt_is_too_long.php +++ b/admin/tool/brickfield/classes/local/htmlchecker/common/checks/img_alt_is_too_long.php @@ -37,7 +37,7 @@ class img_alt_is_too_long extends brickfield_accessibility_test { global $alttextlengthlimit; foreach ($this->get_all_elements('img') as $img) { - $alttextlengthlimit = 125; + $alttextlengthlimit = 750; if ($img->hasAttribute('alt') && core_text::strlen($img->getAttribute('alt')) > $alttextlengthlimit) { $this->add_report($img); } diff --git a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php index c2472cb37f9..d780a2b76ad 100644 --- a/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php +++ b/admin/tool/brickfield/tests/local/htmlchecker/common/checks/img_alt_is_too_long_test.php @@ -64,21 +64,21 @@ EOD; */ public static function img_alt_text_provider(): array { return [ - 'Alt text <= 125 characters' => [ + 'Alt text <= 750 characters' => [ true, - str_repeat("Hello world!", 10), + str_repeat("Hello world!", 60), ], - 'Alt text > 125 characters' => [ + 'Alt text > 750 characters' => [ false, - str_repeat("Hello world!", 25), + str_repeat("Hello world!", 65), ], - 'Multi-byte alt text <= 125 characters' => [ + 'Multi-byte alt text <= 750 characters' => [ true, - str_repeat('こんにちは、世界!', 13), + str_repeat('こんにちは、世界!', 83), ], - 'Multi-byte alt text > 125 characters' => [ + 'Multi-byte alt text > 750 characters' => [ false, - str_repeat('こんにちは、世界!', 30), + str_repeat('こんにちは、世界!', 90), ], ]; } @@ -96,7 +96,7 @@ EOD; if ($expectedpass) { $this->assertEmpty($results); } else { - $this->assertTrue($results[0]->element->tagName === 'img'); + $this->assertEquals('img', $results[0]->element->tagName); } } }