To make you app more accessible to people with disability, you may need to add alternative text to images. Since this app already include the name of the employee in the ListView and in the EMPLOYEE DETAIL pages, it is not a critical step to take.
APPLY TO: Any static or dynamic image on select pages (e.g., EMPLOYEE MASTER PAGE and EMPLOYEE DETAIL page).
<?php
$source_img = $row['Image'];
if($source_img == "")
{
print "<img src='images/photo_not_available.png' width='80' height='80' alt='photo not available' />";
}
else
{
print "<img src='images/$source_img' width='80' height='80' alt='$source_img' />";
}
?>
CODE EXPLANATION: - The alt attribute is used by screen readers (e.g., JAWS, VoiceOver, Talkback) to read the alternative text of an image.
<?php
$source_img = $result[0]['Image']; if($source_img == "")
{
print "<img style='float:left; margin-right:20px; border:1px solid black;' src='images/photo_not_available.png'
width='307' height='240' alt='photo not available' />";
}
else
{
print "<img style='float:left; margin-right:20px; border:1px solid black;' src='images/$source_img'
width='307' height='240' alt='$source_img' />";
}
?>
CODE EXPLANATION: - The alt attribute is used by screen readers (e.g., JAWS, VoiceOver, Talkback) to read the alternative text of an image.