#2606 closed defect (bug) (fixed)
[patch] Improve avatar HTML alt tag. And add title parameter.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | ||
Component: | Core | Keywords: | has-patch |
Cc: |
Description
At the moment, all of the user/group/blog avatars have alt tag text of "Avatar", "Group Avatar", "Avatar Image." For a social network, this is not ideal as typically a single site will have many images which represent a person, group or other object.
The attached patch, against branch 1.2, tries to improve the alt text for all avatars used in a BuddyPress installation. It also adds a title tag parameter to the relevant avatar functions to add a tooltip to visual browsers supporting hover states to "label" the image.
Attachments (3)
Change History (12)
#1
@
15 years ago
Great first patch, Paul.
I've repatched it to:
-add "alt" tags for avatars in bp-forums-templatetags.php
-removed esc_attr() for "bp_core_avatar_alt" and the filters as the respective components already apply wptexturize(), wp_filter_kses(), etc.
-removed "'blog' == $object" from "alt" attribute conditional, since blog avatars do not currently exist
-cleaned up some of the "alt" attribute strings
Let me know what you think.
#2
@
15 years ago
The new patch adds alt tags to more avatars throughout the site. I believe we have them all.
-I added the "'blog' == $object" bit back in as group activity stream entries uses it.
-I had to treat the activity steam avatars differently.
-Activity stream group avatars have an alt tag of "Group avatar", this is because there's currently no way of getting the group name without returning the group object (per your patch); this'd add a query per group avatar in the activity stream, which isn't awesome.
The strings we now have are:
-"picture of ..." for all member avatars.
-"blog avatar of ..." for blog activity stream avatars / "blog authored by ..." for blog directory avatars.
-"group avatar for ..." for group directory, group pages and forum directory.
-"group avatar" for group activity stream avatars (note no insertion of group name).
I don't think the word "avatar" is something we want here. I'm not sure how many non-geeks will know what an "avatar" is in this context. What would we change it with? Thoughts?
#3
@
14 years ago
- Summary changed from Improve avatar HTML alt tag. And add title parameter. to [patch] Improve avatar HTML alt tag. And add title parameter.
#5
@
14 years ago
I believe we got everything. Might need a fresh set of eyes.
Agreed on the word "avatar". Not sure what would be a better word... "picture" is too generic for groups and blogs. "icon" perhaps?
Also, if blog avatars are not going to make it in BP 1.3, then it might be wise to remove secondary avatars for blogs from the activity stream.
v1