Skip to content

Commit

Permalink
Add missing alt tags, refs #8855
Browse files Browse the repository at this point in the history
  • Loading branch information
jraddaoui committed Aug 26, 2015
1 parent 20fe7b4 commit 2c70ef8
Show file tree
Hide file tree
Showing 48 changed files with 104 additions and 107 deletions.
2 changes: 1 addition & 1 deletion apps/qubit/modules/actor/templates/browseSuccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<?php slot('title') ?>
<div class="multiline-header">
<?php echo image_tag('/images/icons-large/icon-people.png') ?>
<?php echo image_tag('/images/icons-large/icon-people.png', array('alt' => '')) ?>
<h1 aria-describedby="results-label"><?php echo __('Showing %1% results', array('%1%' => $pager->getNbResults())) ?></h1>
<span class="sub" id="results-label"><?php echo sfConfig::get('app_ui_label_actor') ?></span>
</div>
Expand Down
3 changes: 1 addition & 2 deletions apps/qubit/modules/contactinformation/templates/_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
</th><th style="width: 15%">
<?php echo __('Primary') ?>
</th><th style="text-align: center; width: 10%">
<?php echo image_tag('delete', array('align' => 'top', 'class' => 'deleteIcon')) ?>
</th>
</tr>
</thead><tbody>
Expand All @@ -40,7 +39,7 @@
<?php

// Template for new display table rows
$editHtml = '<a href="#">' . image_tag('pencil', array('alt' => 'edit', 'style' => 'align: top')) . '</a>';
$editHtml = '<a href="#">' . image_tag('pencil', array('alt' => __('Edit'), 'style' => 'align: top')) . '</a>';

$rowTemplate = json_encode(<<<value
<tr id="{{$form->getWidgetSchema()->generateName('id')}}">
Expand Down
4 changes: 2 additions & 2 deletions apps/qubit/modules/default/templates/_sortableTableHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
array('title' => __('Sort'), 'class' => 'sortable')) ?>

<?php if ($up === $sf_request->sort): ?>
<?php echo image_tag('up.gif') ?>
<?php echo image_tag('up.gif', array('alt' => __('Sort ascending'))) ?>
<?php elseif ($down === $sf_request->sort): ?>
<?php echo image_tag('down.gif') ?>
<?php echo image_tag('down.gif', array('alt' => __('Sort descending'))) ?>
<?php endif; ?>

</th>
2 changes: 1 addition & 1 deletion apps/qubit/modules/digitalobject/templates/_imageflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="imageflow clearfix" id="imageflow">
<?php foreach ($thumbnails as $item): ?>
<?php echo image_tag($item->getFullPath(), array('longdesc' => url_for(array($item->parent->informationObject, 'module' => 'informationobject')), 'alt' => esc_entities(render_title(truncate_text($item->parent->informationObject, 28))))) ?>
<?php echo image_tag($item->getFullPath(), array('longdesc' => url_for(array($item->parent->informationObject, 'module' => 'informationobject')), 'alt' => esc_entities(render_title(truncate_text($item->parent->informationObject, 100))))) ?>
<?php endforeach; ?>
</div>

Expand Down
6 changes: 3 additions & 3 deletions apps/qubit/modules/digitalobject/templates/_showAudio.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<a class="flowplayer audio" href="<?php echo public_path($representation->getFullPath()) ?>"></a>
<?php else: ?>
<div style="text-align: center">
<?php echo image_tag($representation->getFullPath(), array('style' => 'border: #999 1px solid')) ?>
<?php echo image_tag($representation->getFullPath(), array('style' => 'border: #999 1px solid', 'alt' => '')) ?>
</div>
<?php endif;?>

Expand All @@ -18,14 +18,14 @@

<?php if ($iconOnly): ?>

<?php echo link_to(image_tag('play'), $link) ?>
<?php echo link_to(image_tag('play', array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>

<?php else: ?>

<div class="resource">

<div class="resourceRep">
<?php echo link_to(image_tag('play'), $link) ?>
<?php echo link_to(image_tag('play', array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>
</div>

<div class="resourceDesc">
Expand Down
4 changes: 2 additions & 2 deletions apps/qubit/modules/digitalobject/templates/_showCompound.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<tr>
<td>
<?php if (null !== $representation = $leftObject->getCompoundRepresentation()): ?>
<?php echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'informationObject') || QubitTerm::TEXT_ID == $resource->mediaType->id, image_tag($representation->getFullPath()), public_path($leftObject->getFullPath(), array('title' => __('View full size')))) ?>
<?php echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'informationObject') || QubitTerm::TEXT_ID == $resource->mediaType->id, image_tag($representation->getFullPath(), array('alt' => '')), public_path($leftObject->getFullPath(), array('title' => __('View full size')))) ?>
<?php endif; ?>
</td><td>
<?php if (null !== $rightObject && null !== $representation = $rightObject->getCompoundRepresentation()): ?>
<?php echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'informationObject') || QubitTerm::TEXT_ID == $resource->mediaType->id, image_tag($representation->getFullPath()), public_path($rightObject->getFullPath(), array('title' => __('View full size')))) ?>
<?php echo link_to_if(SecurityPriviliges::editCredentials($sf_user, 'informationObject') || QubitTerm::TEXT_ID == $resource->mediaType->id, image_tag($representation->getFullPath(), array('alt' => '')), public_path($rightObject->getFullPath(), array('title' => __('View full size')))) ?>
<?php endif; ?>
</td>
</tr>
Expand Down
10 changes: 5 additions & 5 deletions apps/qubit/modules/digitalobject/templates/_showDownload.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
<?php if (QubitTerm::REFERENCE_ID == $usageType): ?>

<?php if (isset($link)): ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>
<?php else: ?>
<?php echo image_tag($representation->getFullPath()) ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php endif; ?>

<?php else: ?>

<?php if ($iconOnly): ?>

<?php echo link_to(image_tag($representation->getFullPath()), $link) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>

<?php else: ?>

<div style="width: 100px; text-align: center"/>

<?php if (isset($link)): ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>
<?php else: ?>
<?php echo image_tag($representation->getFullPath()) ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php endif; ?>

<?php echo wrap_text($digitalObject->name, 15) ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<div class="digitalObjectRep">
<?php if (isset($link) && $canReadMaster): ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link, array('target' => '_blank')) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link, array('target' => '_blank')) ?>
<?php else: ?>
<?php echo image_tag($representation->getFullPath()) ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php endif; ?>
</div>

Expand Down
12 changes: 6 additions & 6 deletions apps/qubit/modules/digitalobject/templates/_showImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
<?php if (QubitTerm::MASTER_ID == $usageType || QubitTerm::REFERENCE_ID == $usageType): ?>

<?php if (isset($link)): ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link, array('target' => '_blank')) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link, array('target' => '_blank')) ?>
<?php else: ?>
<?php echo image_tag($representation->getFullPath()) ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php endif; ?>

<?php elseif (QubitTerm::THUMBNAIL_ID == $usageType): ?>

<?php if ($iconOnly): ?>

<?php if (isset($link)): ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>
<?php else: ?>
<?php echo image_tag($representation->getFullPath()) ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php endif; ?>

<?php else: ?>
Expand All @@ -24,9 +24,9 @@

<div class="digitalObjectRep">
<?php if (isset($link)): ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>
<?php else: ?>
<?php echo image_tag($representation->getFullPath()) ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php endif; ?>
</div>

Expand Down
4 changes: 2 additions & 2 deletions apps/qubit/modules/digitalobject/templates/_showText.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php if (isset($link)): ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>
<?php else: ?>
<?php echo image_tag($representation->getFullPath()) ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php endif; ?>
14 changes: 7 additions & 7 deletions apps/qubit/modules/digitalobject/templates/_showVideo.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<?php if ($usageType == QubitTerm::MASTER_ID): ?>

<?php if ($link == null): ?>
<?php echo image_tag($representation->getFullPath()) ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php else: ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>
<?php endif; ?>

<?php elseif ($usageType == QubitTerm::REFERENCE_ID): ?>
Expand All @@ -14,7 +14,7 @@
<a class="flowplayer" href="<?php echo public_path($representation->getFullPath()) ?>"></a>
<?php else: ?>
<div style="text-align: center">
<?php echo image_tag($representation->getFullPath(), array('style' => 'border: #999 1px solid')) ?>
<?php echo image_tag($representation->getFullPath(), array('style' => 'border: #999 1px solid', 'alt' => '')) ?>
</div>
<?php endif;?>

Expand All @@ -28,19 +28,19 @@
<?php if ($iconOnly): ?>

<?php if (isset($link)): ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>
<?php else: ?>
<?php echo image_tag($representation->getFullPath()); ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php endif; ?>

<?php else: ?>

<div class="digitalObject">
<div class="digitalObjectRep">
<?php if (isset($link)): ?>
<?php echo link_to(image_tag($representation->getFullPath()), $link) ?>
<?php echo link_to(image_tag($representation->getFullPath(), array('alt' => __('Open original %1%', array('%1%' => sfConfig::get('app_ui_label_digitalobject'))))), $link) ?>
<?php else: ?>
<?php echo image_tag($representation->getFullPath()) ?>
<?php echo image_tag($representation->getFullPath(), array('alt' => '')) ?>
<?php endif; ?>
</div>
<div class="digitalObjectDesc">
Expand Down
26 changes: 13 additions & 13 deletions apps/qubit/modules/digitalobject/templates/browseSuccess.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php use_helper('Text') ?>

<?php decorate_with('layout_wide') ?>

<div class="row-fluid">
<div class="span6">

<div class="multiline-header">
<?php echo image_tag('/images/icons-large/icon-media.png') ?>
<?php echo image_tag('/images/icons-large/icon-media.png', array('alt' => '')) ?>
<h1 aria-describedby="results-label"><?php echo __('Showing %1% results', array('%1%' => $pager->getNbResults())) ?></h1>
<span class="sub" id="results-label"><?php echo sfConfig::get('app_ui_label_digitalobject') ?></span>
</div>
Expand Down Expand Up @@ -55,21 +57,19 @@
<?php $doc = $hit->getData() ?>
<div class="brick">
<div class="preview">
<?php if (!empty($doc['digitalObject']['thumbnailPath'])): ?>
<?php if (QubitAcl::check(QubitInformationObject::getById($hit->getId()), 'readThumbnail') &&
QubitGrantedRight::checkPremis($hit->getId(), 'readThumb')): ?>

<?php echo link_to(image_tag($doc['digitalObject']['thumbnailPath']), array('module' => 'informationobject', 'slug' => $doc['slug'])) ?>
<?php else: ?>
<?php echo link_to(image_tag(QubitDigitalObject::getGenericIconPathByMediaTypeId($doc['digitalObject']['mediaTypeId'])),
array('module' => 'informationobject', 'slug' => $doc['slug'])) ?>
<?php endif; ?>
<?php if (!empty($doc['digitalObject']['thumbnailPath'])
&& QubitAcl::check(QubitInformationObject::getById($hit->getId()), 'readThumbnail')
&& QubitGrantedRight::checkPremis($hit->getId(), 'readThumb')): ?>
<?php echo link_to(image_tag($doc['digitalObject']['thumbnailPath'],
array('alt' => __('Go to %1%', array('%1%' => esc_entities(render_title(truncate_text(get_search_i18n($doc, 'title', array('allowEmpty' => false)), 100))))))),
array('module' => 'informationobject', 'slug' => $doc['slug'])) ?>
<?php else: ?>
<?php echo link_to(image_tag(QubitDigitalObject::getGenericIconPathByMediaTypeId($doc['digitalObject']['mediaTypeId'])),
array('module' => 'informationobject', 'slug' => $doc['slug'])) ?>
<?php echo link_to(image_tag(QubitDigitalObject::getGenericIconPathByMediaTypeId($doc['digitalObject']['mediaTypeId']),
array('alt' => __('Go to %1%', array('%1%' => esc_entities(render_title(truncate_text(get_search_i18n($doc, 'title', array('allowEmpty' => false)), 100))))))),
array('module' => 'informationobject', 'slug' => $doc['slug'])) ?>
<?php endif; ?>
</div>
<p class="description"><?php echo render_title(get_search_i18n($doc, 'title')) ?></p>
<p class="description"><?php echo render_title(get_search_i18n($doc, 'title', array('allowEmpty' => false))) ?></p>
<div class="bottom">
<p>
<?php if ('1' == sfConfig::get('app_inherit_code_informationobject', 1)
Expand Down
2 changes: 1 addition & 1 deletion apps/qubit/modules/function/templates/browseSuccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<?php slot('title') ?>
<div class="multiline-header">
<?php echo image_tag('/images/icons-large/icon-functions.png') ?>
<?php echo image_tag('/images/icons-large/icon-functions.png', array('alt' => '')) ?>
<h1 aria-describedby="results-label"><?php echo __('Showing %1% results', array('%1%' => $pager->getNbResults())) ?></h1>
<span class="sub" id="results-label"><?php echo sfConfig::get('app_ui_label_function') ?></span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/qubit/modules/informationobject/templates/_event.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use_helper('Javascript');

// Template for new display table rows
$editHtml = image_tag('pencil', array('alt' => 'edit', 'style' => 'align: top'));
$editHtml = image_tag('pencil', array('alt' => __('Edit'), 'style' => 'align: top'));

$rowTemplate = json_encode(<<<value
<tr id="{{$form->getWidgetSchema()->generateName('id')}}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<?php slot('title') ?>
<div class="multiline-header">
<?php echo image_tag('/images/icons-large/icon-archival.png') ?>
<?php echo image_tag('/images/icons-large/icon-archival.png', array('alt' => '')) ?>
<h1 aria-describedby="results-label"><?php echo __('Showing %1% results', array('%1%' => $pager->getNbResults())) ?></h1>
<span class="sub" id="results-label"><?php echo sfConfig::get('app_ui_label_informationobject') ?></span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<th colspan="2" style="width: 90%;">
<?php echo __('Containers') ?>
</th><th style="width: 5%;">
<?php echo image_tag('delete', array('align' => 'top', 'class' => 'deleteIcon')) ?>
</th>
</tr>
</thead><tbody>
Expand All @@ -33,7 +32,7 @@
<td style="width: 90%"><div class="animateNicely">
<?php echo $item->subject->getLabel() ?>
</div></td><td style="width: 20px;"><div class="animateNicely">
<?php echo link_to(image_tag('pencil', array('align' => 'top')), array($item->subject, 'module' => 'physicalobject', 'action' => 'edit')) ?>
<?php echo link_to(image_tag('pencil', array('style' => 'align: top', 'alt' => __('Edit')), array($item->subject, 'module' => 'physicalobject', 'action' => 'edit')) ?>
</div></td><td style="width: 20px;"><div class="animateNicely">
<input class="multiDelete" name="delete_relations[]" type="checkbox" value="<?php echo url_for(array($item, 'module' => 'relation')) ?>"/>
</div></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<?php if ($includeThumbnails): ?>
<td>
<?php if (null != ($do = $item['resource']->getDigitalObject()) && (null != $do->thumbnail)): ?>
<?php echo image_tag($do->thumbnail->getFullPath()) ?>
<?php echo image_tag($do->thumbnail->getFullPath(), array('alt' => '')) ?>
<?php else: ?>
<?php echo __('N/A') ?>
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion apps/qubit/modules/menu/templates/_userMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</div>

<div class="top-dropdown-header">
<?php echo image_tag($gravatar) ?>&nbsp;
<?php echo image_tag($gravatar, array('alt' => '')) ?>&nbsp;
<h2><?php echo __('Hi, %1%', array('%1%' => $sf_user->user->username)) ?></h2>
</div>

Expand Down
4 changes: 2 additions & 2 deletions apps/qubit/modules/menu/templates/listSuccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
<?php if (isset($item['prev'])): ?>
<?php echo link_to(image_tag('up.gif', array('alt' => __('Move up'))), array('module' => 'menu', 'action' => 'list', 'move' => $item['id'], 'before' => $item['prev']), array('title' => __('Move item up in list'))) ?>
<?php else: ?>
<?php echo image_tag('1x1_transparent', array('height' => '5', 'width' => '13')) ?>
&nbsp;&nbsp;
<?php endif; ?>

<?php if (isset($item['next'])): ?>
<?php echo link_to(image_tag('down.gif', array('alt' => __('Move down'))), array('module' => 'menu', 'action' => 'list', 'move' => $item['id'], 'after' => $item['next']), array('title' => __('Move item down in list'))) ?>
<?php else: ?>
<?php echo image_tag('1x1_transparent', array('height' => '5', 'width'=>'13')) ?>
&nbsp;&nbsp;
<?php endif; ?>

<?php if ($item['protected']): ?>
Expand Down
8 changes: 4 additions & 4 deletions apps/qubit/modules/physicalobject/templates/browseSuccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
<th class="sortable">
<?php echo link_to(__('Name'), array('sort' => ('nameUp' == $sf_request->sort) ? 'nameDown' : 'nameUp') + $sf_data->getRaw('sf_request')->getParameterHolder()->getAll(), array('title' => __('Sort'), 'class' => 'sortable')) ?>
<?php if ('nameUp' == $sf_request->sort): ?>
<?php echo image_tag('up.gif') ?>
<?php echo image_tag('up.gif', array('alt' => __('Sort ascending'))) ?>
<?php elseif ('nameDown' == $sf_request->sort): ?>
<?php echo image_tag('down.gif') ?>
<?php echo image_tag('down.gif', array('alt' => __('Sort descending'))) ?>
<?php endif; ?>
</th><th class="sortable">
<?php echo link_to(__('Location'), array('sort' => ('locationUp' == $sf_request->sort) ? 'locationDown' : 'locationUp') + $sf_data->getRaw('sf_request')->getParameterHolder()->getAll(), array('title' => __('Sort'), 'class' => 'sortable')) ?>
<?php if ('locationUp' == $sf_request->sort): ?>
<?php echo image_tag('up.gif') ?>
<?php echo image_tag('up.gif', array('alt' => __('Sort ascending'))) ?>
<?php elseif ('locationDown' == $sf_request->sort): ?>
<?php echo image_tag('down.gif') ?>
<?php echo image_tag('down.gif', array('alt' => __('Sort descending'))) ?>
<?php endif; ?>
</th><th>
<?php echo __('Type') ?>
Expand Down
Loading

0 comments on commit 2c70ef8

Please sign in to comment.