AW21 Rule 1.3.1

  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.
  • warning: Invalid argument supplied for foreach() in /home/tanaguru/www/sites/all/modules/contrib/cck/theme/content-field.tpl.php on line 35.

Summary

Invalidate images with longdesc and with alt containing image filename.

Invalidate images with longdesc and with alt finishing by an image extension (.jpg, .png...).

Business description

Criterion :

1.3

Test :

1.3.1

Test description :

For each image that conveys information (img tag) with an alt attribute, is the content of this attribute relevant (except in special cases)?

Level :

Technical description

Scope :
Decision level :

Algorithm

Selection

Set1 : All the <img> tags of the page with an "alt" attribute but not within an <a> tag (in this case, the image would be considered as a link)

Process

TestA

SetA : All the <img> tags of the page with an "alt" attribute and a 'longdesc" attribute but not within a <a> tag

For each element of SetA, test the equality between the content of the "alt" attribute and the file name, if the file name has an image extension.

For each occurence of true-result of TestA, raise a MessageA

TestB

SetB : All the <img> tags of the page with an "alt" attribute but without "longdesc" attribute, not within a <a> tag, and potentially decorative (each image with a dimension equal to 1 or which is mono-colored is seen as potentialy decorative)

For each element of SetB, provided the image file name has an image extension, test the equality between the content of the "alt" attribute and the file name.

For each occurence of true-result of TestB, raise a MessageB

TestC

SetC : All the <img> tags of the page with an "alt" attribute but without "longdesc" attribute, not within a <a> tag and that are not potentially decorative (SetC = Set1 - SetA - SetB)

For each element of SetC, provided the image file name has an image extension, test the equality between the content of the "alt" attribute and the file name.

For each occurence of true-result of TestC, raise a MessageC

Test4

For each element of SetA, test if the content of the "alt" attribute has an image extension.

For each occurence of true-result of Test4, raise a MessageA

Test5

For each element of SetB, test if the content of the "alt" attribute has an image extension.

For each occurence of true-result of Test5, raise a MessageB

Test6

For each element of SetC, test if the content of the "alt" attribute has an image extension.

For each occurence of true-result of Test6, raise a MessageC

MessageA : Not Pertinent Alt Attribute
  • code : NotPertinentAltAttribute
  • status: Failed
  • parameter : tag name
  • present in source : yes
MessageB : Not Pertinent Alt Attribut But Suspected Decorative Image
  • code : NotPertinentAltAttributButSuspectedDecorativeImage
  • status: NMI
  • parameter : tag name
  • present in source : yes
MessageC : Not Pertinent Alt Attribut With Suspected Informative Image
  • code : NotPertinentAltAttributWithSuspectedInformativeImage
  • status: NMI
  • parameter : tag name
  • present in source : yes
Used nomenclature
  • ImageFileExtensions ("jpg", "jpeg", "bmp", png", "gif")

Analysis

NA

Selection is empty (The page has no <img> tag with an "alt" attribute)

Failed

Test1 or Test4 return true for at least one element.

NMI

All other cases (i.e. one of Test 2, 3, 5, 6 returns true for at least one element)

Notes

No notes yet for that rule