add alt to all images

darcs-hash:20080520134631-84dde-249574ec7e16108cf47f3001c2bc726bdc6f8751.gz
This commit is contained in:
Evan Prodromou 2008-05-20 09:46:31 -04:00
parent e70b7d3a6c
commit f614bb5bf2
4 changed files with 25 additions and 11 deletions

View File

@ -36,7 +36,8 @@ class AvatarAction extends SettingsAction {
common_element('img', array('src' => $original->url, common_element('img', array('src' => $original->url,
'class' => 'avatar original', 'class' => 'avatar original',
'width' => $original->width, 'width' => $original->width,
'height' => $original->height)); 'height' => $original->height,
'alt' => $user->nickname));
} }
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
@ -45,7 +46,8 @@ class AvatarAction extends SettingsAction {
common_element('img', array('src' => $avatar->url, common_element('img', array('src' => $avatar->url,
'class' => 'avatar profile', 'class' => 'avatar profile',
'width' => AVATAR_PROFILE_SIZE, 'width' => AVATAR_PROFILE_SIZE,
'height' => AVATAR_PROFILE_SIZE)); 'height' => AVATAR_PROFILE_SIZE,
'alt' => $user->nickname));
} }
common_element_start('form', array('enctype' => 'multipart/form-data', common_element_start('form', array('enctype' => 'multipart/form-data',

View File

@ -102,7 +102,7 @@ class ShowstreamAction extends StreamAction {
'class' => 'avatar profile', 'class' => 'avatar profile',
'width' => AVATAR_PROFILE_SIZE, 'width' => AVATAR_PROFILE_SIZE,
'height' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE,
'title' => $profile->nickname)); 'alt' => $profile->nickname));
} }
if ($profile->fullname) { if ($profile->fullname) {
if ($profile->homepage) { if ($profile->homepage) {
@ -161,7 +161,8 @@ class ShowstreamAction extends StreamAction {
common_element_start('div', 'row'); common_element_start('div', 'row');
} }
common_element_start('a', array('title' => $subs->fullname || common_element_start('a', array('title' => ($subs->fullname) ?
$subs->fullname :
$subs->nickname, $subs->nickname,
'href' => $subs->profileurl, 'href' => $subs->profileurl,
'class' => 'subscription')); 'class' => 'subscription'));
@ -169,7 +170,10 @@ class ShowstreamAction extends StreamAction {
common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_MINI_AVATAR), common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_MINI_AVATAR),
'width' => AVATAR_MINI_SIZE, 'width' => AVATAR_MINI_SIZE,
'height' => AVATAR_MINI_SIZE, 'height' => AVATAR_MINI_SIZE,
'class' => 'avatar mini')); 'class' => 'avatar mini',
'alt' => ($subs->fullname) ?
$subs->fullname :
$subs->nickname));
common_element_end('a'); common_element_end('a');
if ($cnt % SUBSCRIPTIONS_PER_ROW == 0) { if ($cnt % SUBSCRIPTIONS_PER_ROW == 0) {

View File

@ -62,15 +62,19 @@ class SubscribedAction extends Action {
common_element_start('div', 'row'); common_element_start('div', 'row');
} }
common_element_start('a', array('title' => $subs->fullname || common_element_start('a', array('title' => ($subs->fullname) ?
$subs->nickname, $subs->fullname :
$subs->nickname,
'href' => $subs->profileurl, 'href' => $subs->profileurl,
'class' => 'subscription')); 'class' => 'subscription'));
$avatar = $subs->getAvatar(AVATAR_STREAM_SIZE); $avatar = $subs->getAvatar(AVATAR_STREAM_SIZE);
common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR), common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR),
'width' => AVATAR_STREAM_SIZE, 'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE, 'height' => AVATAR_STREAM_SIZE,
'class' => 'avatar stream')); 'class' => 'avatar stream',
'alt' => ($subs->fullname) ?
$subs->fullname :
$subs->nickname));
common_element_end('a'); common_element_end('a');
# XXX: subscribe form here # XXX: subscribe form here

View File

@ -59,15 +59,19 @@ class SubscriptionsAction extends Action {
common_element_start('div', 'row'); common_element_start('div', 'row');
} }
common_element_start('a', array('title' => $subs->fullname || common_element_start('a', array('title' => ($subs->fullname) ?
$subs->nickname, $subs->fullname :
$subs->nickname,
'href' => $subs->profileurl, 'href' => $subs->profileurl,
'class' => 'subscription')); 'class' => 'subscription'));
$avatar = $subs->getAvatar(AVATAR_STREAM_SIZE); $avatar = $subs->getAvatar(AVATAR_STREAM_SIZE);
common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR), common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR),
'width' => AVATAR_STREAM_SIZE, 'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE, 'height' => AVATAR_STREAM_SIZE,
'class' => 'avatar stream')); 'class' => 'avatar stream',
'alt' => ($subs->fullname) ?
$subs->fullname :
$subs->nickname));
common_element_end('a'); common_element_end('a');
# XXX: subscribe form here # XXX: subscribe form here