Commit cab5ab74 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(core) Remove useless alt attribute on img tags

Made sure to empty alt attribute when an img is decoration and does not
 provide information.
In some files also fixed some alt content when it made sense

issue #5917
parent 4ae053ce
......@@ -5,16 +5,16 @@
<form action="main.php{$plug}" name="mainform" id="mainform" method="post" enctype="multipart/form-data">
<div class="setup-header">
<div id="header-left">
<img id="fd-logo" class="optional" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory"/>
<img id="fd-logo" class="optional" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory logo"/>
<a class="maintitlebar" href="main.php?reset=1">
<img src="geticon.php?context=actions&amp;icon=go-home&amp;size=22" alt="Main"/>&nbsp;{t}Main{/t}
<img src="geticon.php?context=actions&amp;icon=go-home&amp;size=22" alt=""/>&nbsp;{t}Main{/t}
</a>
&nbsp;
<a class="maintitlebar logout" href="index.php?signout=1">
<img src="geticon.php?context=actions&amp;icon=application-exit&amp;size=22" alt="Sign out"/>&nbsp;{t}Sign out{/t}
<img src="geticon.php?context=actions&amp;icon=application-exit&amp;size=22" alt=""/>&nbsp;{t}Sign out{/t}
</a>
<a class="plugtop">
<img src="{$headline_image|escape}" alt="{t}{$headline|escape}{/t}"/>{t}{$headline|escape}{/t}
<img src="{$headline_image|escape}" alt=""/>{t}{$headline|escape}{/t}
</a>
</div>
<div id="header-right">
......
......@@ -11,7 +11,7 @@
{$msg_dialogs}
<div id="window-titlebar">
<img id="fd-logo" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory"/>
<img id="fd-logo" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory logo"/>
<p>
{t}Sign in{/t}
</p>
......
......@@ -4,17 +4,17 @@
<li id="actionmenu_{$entry.name|escape}" {if $entry.separator}style="border-top:1px solid #AAA"{/if}>
{if isset($entry.actions)}
<a href="#">
<img src="{$entry.icon|escape}" alt="{$entry.name|escape}"/>&nbsp;{$entry.label|escape}
<img src="{$entry.icon|escape}" alt=""/>&nbsp;{$entry.label|escape}
&nbsp;<img src="images/forward-arrow.png" alt="forward arrow"/>
</a>
{menu data=$entry.actions level=$level+1}
{elseif $entry.enabled}
<a href="#" onClick="document.getElementById('actionmenu').value='{$entry.name|escape}';document.getElementById('exec_act').click();">
<img src="{$entry.icon|escape}" alt="{$entry.name|escape}">&nbsp;{$entry.label|escape}
<img src="{$entry.icon|escape}" alt=""/>&nbsp;{$entry.label|escape}
</a>
{else}
<a>
<img src="{$entry.icon|escape}&amp;disabled=1" alt="{$entry.name|escape}">&nbsp;{$entry.label|escape}
<img src="{$entry.icon|escape}&amp;disabled=1" alt=""/>&nbsp;{$entry.label|escape}
</a>
{/if}
</li>
......@@ -27,7 +27,7 @@
<div style="display:none"><input type="submit" formnovalidate="formnovalidate" name="exec_act" id="exec_act" value=""/></div>
<ul class="level1" id="root">
<li>
<a href="#">{t}Actions{/t}&nbsp;<img class="center optional" src="images/down-arrow.png" alt="down arrow"/></a>
<a href="#">{t}Actions{/t}&nbsp;<img class="center optional" src="images/down-arrow.png" alt=""/></a>
{menu data=$actions}
</li>
</ul>
......
......@@ -4,7 +4,7 @@
<input type="checkbox" id="{$key}" name="{$key}" value="1"
{if ($input.checked)}checked="checked"{/if}/>
{if isset($input.icon)}
<img src="{$input.icon|escape}" alt="{$key}"/>
<img src="{$input.icon|escape}" alt=""/>
{else}
<img src="images/empty.png" alt=""/>
{/if}
......
......@@ -10,7 +10,7 @@
<label for="{$key}">
<input type="checkbox" id="{$key}" name="{$key}" value="1"
{if ($type.show)}checked="checked"{/if}/>
<img src="{$type.infos.icon|escape}" alt="{$key}"/>
<img src="{$type.infos.icon|escape}" alt=""/>
{$type.infos.name|escape}
</label>
{/foreach}
......@@ -18,7 +18,7 @@
<label for="filter_type_TEMPLATE">
<input type="checkbox" id="filter_type_TEMPLATE" name="filter_type_TEMPLATE" value="1"
{if ($TEMPLATES)}checked="checked"{/if}/>
<img src="geticon.php?context=devices&amp;icon=template&amp;size=16" alt="filter_type_TEMPLATE"/>
<img src="geticon.php?context=devices&amp;icon=template&amp;size=16" alt=""/>
{t}Template{/t}
</label>
{/if}
......
......@@ -11,7 +11,7 @@
<input type="hidden" name="CSRFtoken" value="{$CSRFtoken}"/>
<div id="window-titlebar">
<img id="fd-logo" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory"/>
<img id="fd-logo" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory logo"/>
<p>
{t}Lost password{/t}
</p>
......
......@@ -13,7 +13,7 @@
<div id="window-titlebar">
<p>
<img class="center" src="geticon.php?context=status&amp;icon=dialog-password&amp;size=48" alt="{t}Password{/t}" title="{t}Password{/t}"/>
<img class="center" src="geticon.php?context=status&amp;icon=dialog-password&amp;size=48" alt=""/>
{t}Lost password{/t}
</p>
</div>
......
<div class="setup-header">
<div id="header-left">
<img id="fd-logo" class="optional" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory"/>
<img id="fd-logo" class="optional" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory logo"/>
</div>
<div id="header-right">
</div>
......
......@@ -238,7 +238,7 @@ class baseSelector
$this->tree .= '<li><a'.$selected.' '.$link.' title="'.$base.'">'.
'<img class="center" '.
'src="'.htmlentities($config->department_info[$base]['img'], ENT_COMPAT, 'UTF-8').'" '.
'alt="'.htmlentities($config->department_info[$base]['name'], ENT_COMPAT, 'UTF-8').'"/>&nbsp;'.
'alt=""/>&nbsp;'.
$this->escape($config->department_info[$base]['name']).
(($config->department_info[$base]['description'] == '') ? '' : '&nbsp;<span class="informal">['.$this->escape($config->department_info[$base]['description']).']</span>').
'</a>';
......
......@@ -1168,7 +1168,7 @@ class listing
/* Draw reload button, this button is enabled everytime */
$result["RELOAD"] = "<input class='center optional' type='image' src='geticon.php?context=actions&amp;icon=view-refresh&amp;size=16' ".
"title='"._("Reload list")."' name='REFRESH' alt='"._("Submit")."'>";
"title='"._("Reload list")."' name='REFRESH' alt='"._("Reload list")."'>";
return $result;
}
......@@ -1311,7 +1311,7 @@ class listing
$result = '<input type="hidden" name="act" id="actionmenu" value="">'.
'<div style="display:none"><input type="submit" formnovalidate="formnovalidate" name="exec_act" id="exec_act" value=""/></div>'.
'<ul class="level1" id="root"><li><a href="#">'._('Actions').
'&nbsp;<img class="center optional" src="images/down-arrow.png" alt="down arrow"/></a>';
'&nbsp;<img class="center optional" src="images/down-arrow.png" alt=""/></a>';
// Build ul/li list
$result .= $this->recurseActions($this->xmlData['actionmenu']['action']);
......@@ -1325,7 +1325,7 @@ class listing
.'<a href="#" onClick="'
."document.getElementById('actionmenu').value='$action';document.getElementById('exec_act').click();"
.'">'
.'<img src="'.htmlentities($icon, ENT_COMPAT, 'UTF-8').'" alt="'.$action.'" class="center">&nbsp;'.$name.'</a>'
.'<img src="'.htmlentities($icon, ENT_COMPAT, 'UTF-8').'" alt="" class="center"/>&nbsp;'.$name.'</a>'
.'</li>';
}
......@@ -1364,7 +1364,7 @@ class listing
if (isset($action['label'])) {
$img = "";
if (isset($action['image'])) {
$img = "<img class='center' src='".htmlentities($action['image'], ENT_COMPAT, 'UTF-8')."' alt='".$action['label']."'/>&nbsp;";
$img = "<img class='center' src='".htmlentities($action['image'], ENT_COMPAT, 'UTF-8')."' alt=''/>&nbsp;";
}
$result .= "<li id='actionmenu_".strtolower($action['label'])."'$separator><a href='#'>$img"._($action['label'])."&nbsp;<img src='images/forward-arrow.png' alt='forward arrow'/></a>";
}
......@@ -1640,7 +1640,7 @@ class listing
if ($this->copyPasteHandler->entries_queued()) {
$result .= $this->renderActionMenuActionLink($separator, 'paste', _('Paste'), 'geticon.php?context=actions&icon=edit-paste&size=16');
} else {
$result .= "<li$separator>".'<a href="#"><img src="geticon.php?context=actions&amp;icon=edit-paste&amp;size=16&amp;disabled=1" alt="paste" class="center">&nbsp;'._('Paste').'</a></li>';
$result .= "<li$separator>".'<a href="#"><img src="geticon.php?context=actions&amp;icon=edit-paste&amp;size=16&amp;disabled=1" alt="" class="center"/>&nbsp;'._('Paste').'</a></li>';
}
}
......@@ -1704,7 +1704,7 @@ class listing
if ($this->snapshotHandler->hasDeletedSnapshots($this->parent->getSnapshotBases())) {
$result .= $this->renderActionMenuActionLink($separator, 'restore', _('Restore snapshots'), 'geticon.php?context=actions&icon=document-restore&size=16');
} else {
$result .= "<li$separator><a href='#'><img src='geticon.php?context=actions&amp;icon=document-restore&amp;size=16&amp;disabled=1' alt='restore' class='center'>&nbsp;"._("Restore snapshots")."</a></li>";
$result .= "<li$separator><a href='#'><img src='geticon.php?context=actions&amp;icon=document-restore&amp;size=16&amp;disabled=1' alt='' class='center'>&nbsp;"._("Restore snapshots")."</a></li>";
}
}
......@@ -1718,7 +1718,7 @@ class listing
$result = "";
// Draw entries
$result .= "<li$separator id='actionmenu_exportList'><a href='#'><img class='center' src='geticon.php?context=actions&amp;icon=document-export&amp;size=16' alt='export'>&nbsp;"._("Export list")."&nbsp;<img src='images/forward-arrow.png' alt='arrow'></a><ul class='level3'>";
$result .= "<li$separator id='actionmenu_exportList'><a href='#'><img class='center' src='geticon.php?context=actions&amp;icon=document-export&amp;size=16' alt=''>&nbsp;"._("Export list")."&nbsp;<img src='images/forward-arrow.png' alt='arrow'></a><ul class='level3'>";
// Render export actions
foreach ($this->exporters as $action => $exporter) {
......@@ -1755,7 +1755,7 @@ class listing
} else {
$result .= '<img class="center"'.
' src="geticon.php?context=actions&amp;icon=document-restore&amp;size=16&amp;disabled=1"'.
' alt="restore"/>';
' alt="'._('Restore snapshot').'"/>';
}
}
......
......@@ -445,7 +445,7 @@ class pluglist {
}
$entries .= '<div class="iconmenu" id="menuitem_icon_'.$id.'" onClick=\'location.href="'.$href.'"\' title="'.$plDescription.'">';
$item = '<div class="imgcontainer"><img src="'.$image.'" alt="'.$plHeadline.' icon"/></div><span>&nbsp;'.$plHeadline.'</span>';
$item = '<div class="imgcontainer"><img src="'.$image.'" alt=""/></div><span>&nbsp;'.$plHeadline.'</span>';
$entries .= $item."</div>\n";
}
......
......@@ -185,7 +185,7 @@ function DEBUG($level, $line, $function, $file, $data, $info = '')
if (session::global_get('DEBUGLEVEL') & $level) {
if ($first) {
echo '<div id="debug-handling" class="notice">'.
'<img src="geticon.php?context=status&amp;icon=dialog-information&amp;size=22" alt="info icon" style="vertical-align:middle;margin-right:.2em;"/>'.
'<img src="geticon.php?context=status&amp;icon=dialog-information&amp;size=22" alt="Information" style="vertical-align:middle;margin-right:.2em;"/>'.
'There is some debug output '.
'<button onClick="javascript:$$(\'div.debug_div\').each(function (a) { a.toggle(); });">Toggle</button>'.
'</div>';
......
......@@ -75,7 +75,7 @@ class multiPlugin extends simplePlugin
}
unset($plug);
if (!$enabled) {
$display = '<img alt="" src="geticon.php?context=status&amp;icon=dialog-error&amp;size=16" align="middle"/>&nbsp;<b>'.
$display = '<img alt="'._('Error').'" src="geticon.php?context=status&amp;icon=dialog-error&amp;size=16" align="middle"/>&nbsp;<b>'.
msgPool::noValidExtension()."</b>";
return $display;
}
......
......@@ -699,7 +699,7 @@ class simplePlugin
}
} elseif (!$this->is_account) {
$plInfo = pluglist::pluginInfos(get_class($this));
$this->header = '<img alt="" src="geticon.php?context=status&amp;icon=dialog-error&amp;size=16" align="middle"/>&nbsp;<b>'.
$this->header = '<img alt="'._('Error').'" src="geticon.php?context=status&amp;icon=dialog-error&amp;size=16" align="middle"/>&nbsp;<b>'.
msgPool::noValidExtension($plInfo['plShortName'])."</b>";
$this->displayPlugin = FALSE;
return $this->header.$this->inheritanceDisplay();
......@@ -835,8 +835,7 @@ class simplePlugin
if (isset($sectionInfo['icon'])) {
$legend = '<img '.
'src="'.htmlentities($sectionInfo['icon'], ENT_COMPAT, 'UTF-8').'" '.
'alt="section '.$sectionInfo['name'].' icon" '.
'title="section '.$sectionInfo['name'].' icon" '.
'alt="" '.
'/>'.$legend;
}
$smarty->assign("section", $legend);
......
......@@ -4,9 +4,9 @@
<form action="setup.php" name="mainform" id="mainform" method="post" enctype="multipart/form-data">
<div class="setup-header">
<div id="header-left">
<img id="fd-logo" class="optional" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory"/>
<img id="fd-logo" class="optional" src="geticon.php?context=applications&amp;icon=fusiondirectory&amp;size=48" alt="FusionDirectory logo"/>
<a class="plugtop">
<img src="{$headline_image|escape}" alt="{t}{$headline}{/t}"/>{t}{$headline}{/t}
<img src="{$headline_image|escape}" alt=""/>{t}{$headline}{/t}
</a>
</div>
<div id="header-right">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment