MDL-83634 tool_brickfield: Downgrade image alt text check's severity
Given that * There is no formally defined limit for alt text length, * Current versions of screen readers can read alt texts longer than 125 characters, * Accessibility checkers like axe DevTools, WAVE, etc., do not raise errors or warnings about long image alt texts. This patch: - Downgrades the default severity for the `img_alt_is_too_long` check from `BA_TEST_SEVERE` to `BA_TEST_SUGGESTION`. - Updates the `checkdesc:imgaltistoolong` lang string to be more of a reminder/suggestion rather than an error.
This commit is contained in:
@@ -30,10 +30,6 @@ use tool_brickfield\local\htmlchecker\common\brickfield_accessibility_test;
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class img_alt_is_too_long extends brickfield_accessibility_test {
|
||||
|
||||
/** @var int The default severity code for this test. */
|
||||
public $defaultseverity = \tool_brickfield\local\htmlchecker\brickfield_accessibility::BA_TEST_SEVERE;
|
||||
|
||||
/**
|
||||
* The main check function. This is called by the parent class to actually check content.
|
||||
*/
|
||||
|
||||
@@ -179,7 +179,7 @@ $string['checkdesc:headerh3'] = 'Headers following after H3 headers (the editor
|
||||
$string['checkdesc:headershavetext'] = 'A header needs to contain text to be perceivable.';
|
||||
$string['checkdesc:iisnotused'] = 'Italic (i) elements should not be used; "em" should be used instead.';
|
||||
$string['checkdesc:imgaltisdifferent'] = 'Image alt (alternative) text should not be the image filename.';
|
||||
$string['checkdesc:imgaltistoolong'] = 'Image alt (alternative) text should not be more than the maximum allowed (125) characters.';
|
||||
$string['checkdesc:imgaltistoolong'] = 'Ensure that the image alt (alternative) text is concise enough to describe the image.';
|
||||
$string['checkdesc:imgaltnotemptyinanchor'] = 'Image alt (alternative) text should not be empty, especially when the image has a link going elsewhere.';
|
||||
$string['checkdesc:imgaltnotplaceholder'] = 'Image alt (alternative) text should not be a simple placeholder text, such as "image".';
|
||||
$string['checkdesc:imghasalt'] = 'Image alt (alternative) text should not be missing for image elements, unless purely decorative with no meaning.';
|
||||
|
||||
Reference in New Issue
Block a user