]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add alt to all images
authorEvan Prodromou <evan@prodromou.name>
Tue, 20 May 2008 13:46:31 +0000 (09:46 -0400)
committerEvan Prodromou <evan@prodromou.name>
Tue, 20 May 2008 13:46:31 +0000 (09:46 -0400)
darcs-hash:20080520134631-84dde-249574ec7e16108cf47f3001c2bc726bdc6f8751.gz

actions/avatar.php
actions/showstream.php
actions/subscribed.php
actions/subscriptions.php

index 00b7ea6c0f1e1baebdd11200d4b558255ccd6078..53595af12653c67d345324f69c8a6c447e0c15f4 100644 (file)
@@ -36,7 +36,8 @@ class AvatarAction extends SettingsAction {
                        common_element('img', array('src' => $original->url,
                                                                                'class' => 'avatar original',
                                                                                'width' => $original->width,
-                                                                               'height' => $original->height));
+                                                                               'height' => $original->height,
+                                                                               'alt' => $user->nickname));
                }
 
                $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
@@ -45,7 +46,8 @@ class AvatarAction extends SettingsAction {
                        common_element('img', array('src' => $avatar->url,
                                                                                'class' => 'avatar profile',
                                                                                'width' => AVATAR_PROFILE_SIZE,
-                                                                               'height' => AVATAR_PROFILE_SIZE));
+                                                                               'height' => AVATAR_PROFILE_SIZE,
+                                                                               'alt' => $user->nickname));
                }
 
                common_element_start('form', array('enctype' => 'multipart/form-data',
index 5e8802cd7297723c9d1d4736847bcb5ad081ad51..6cd4773ee73e699c2d7b5bf03e0f1c313f9bf7f9 100644 (file)
@@ -102,7 +102,7 @@ class ShowstreamAction extends StreamAction {
                                                                                'class' => 'avatar profile',
                                                                                'width' => AVATAR_PROFILE_SIZE,
                                                                                'height' => AVATAR_PROFILE_SIZE,
-                                                                               'title' => $profile->nickname));
+                                                                               'alt' => $profile->nickname));
                }
                if ($profile->fullname) {
                        if ($profile->homepage) {
@@ -161,7 +161,8 @@ class ShowstreamAction extends StreamAction {
                                        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,
                                                                                                'href' => $subs->profileurl,
                                                                                                'class' => 'subscription'));
@@ -169,7 +170,10 @@ class ShowstreamAction extends StreamAction {
                                common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_MINI_AVATAR),
                                                                                        'width' => AVATAR_MINI_SIZE,
                                                                                        'height' => AVATAR_MINI_SIZE,
-                                                                                       'class' => 'avatar mini'));
+                                                                                       'class' => 'avatar mini',
+                                                                                       'alt' =>  ($subs->fullname) ?
+                                                                                               $subs->fullname :
+                                                                                               $subs->nickname));
                                common_element_end('a');
 
                                if ($cnt % SUBSCRIPTIONS_PER_ROW == 0) {
index 61cb8dac668b97b82b99fd1876ec1606117d6a48..eed2b6c2cb9448958a8a1f2c4dbe65bdb747ed90 100644 (file)
@@ -62,15 +62,19 @@ class SubscribedAction extends Action {
                                common_element_start('div', 'row');
                        }
 
-                       common_element_start('a', array('title' => $subs->fullname ||
-                                                                                                  $subs->nickname,
+                       common_element_start('a', array('title' => ($subs->fullname) ?
+                                                                                       $subs->fullname :
+                                                                                       $subs->nickname,
                                                                                        'href' => $subs->profileurl,
                                                                                        'class' => 'subscription'));
                        $avatar = $subs->getAvatar(AVATAR_STREAM_SIZE);
                        common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR),
                                                                                'width' => AVATAR_STREAM_SIZE,
                                                                                'height' => AVATAR_STREAM_SIZE,
-                                                                               'class' => 'avatar stream'));
+                                                                               'class' => 'avatar stream',
+                                                                               'alt' => ($subs->fullname) ?
+                                                                                       $subs->fullname :
+                                                                                       $subs->nickname));
                        common_element_end('a');
 
                        # XXX: subscribe form here
index 6695029394648268e4feb5e33b09ebafd203de84..ee073d126fc4d70a926451946e71d3653e05df71 100644 (file)
@@ -59,15 +59,19 @@ class SubscriptionsAction extends Action {
                                common_element_start('div', 'row');
                        }
 
-                       common_element_start('a', array('title' => $subs->fullname ||
-                                                                                                  $subs->nickname,
+                       common_element_start('a', array('title' => ($subs->fullname) ?
+                                                                                       $subs->fullname :
+                                                                                       $subs->nickname,
                                                                                        'href' => $subs->profileurl,
                                                                                        'class' => 'subscription'));
                        $avatar = $subs->getAvatar(AVATAR_STREAM_SIZE);
                        common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR),
                                                                                'width' => AVATAR_STREAM_SIZE,
                                                                                'height' => AVATAR_STREAM_SIZE,
-                                                                               'class' => 'avatar stream'));
+                                                                               'class' => 'avatar stream',
+                                                                               'alt' => ($subs->fullname) ?
+                                                                               $subs->fullname :
+                                                                               $subs->nickname));
                        common_element_end('a');
 
                        # XXX: subscribe form here