Opened 9 years ago
Closed 9 years ago
#7363 closed enhancement (fixed)
Accessibility: Remove redundant `title` attributes Part 2
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.8 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Core | Keywords: | has-screenshots has-patch commit |
| Cc: |
Description
Second pass at removing redundant title attributes. See #7090.
Attached images with the delete mark are the targets for this ticket: Log in, Recent Networkwide Posts, Groups, and Friends widgets along with some found in the Messages, Notifications, and Activity screens.
The other title attributes which provide additional information for text links, group/member avatars, etc. will be addressed in #7188 (http://codepen.io/mercime/pen/vygMEg)
Attachments (5)
Change History (14)
#4
@
9 years ago
r11381 broke 2 unit tests:
See https://travis-ci.org/buddypress/BuddyPress/jobs/191170773
bash
There were 2 failures:
1) BP_Tests_Blogs_Template::test_bp_blog_get_avatar_should_respect_title_parameter
Failed asserting that '<img src="//www.gravatar.com/avatar/670fb8c83fcf2ffe20481fbbc01e18db?s=150&r=g&d=mm" class="avatar user-126-avatar avatar-150 photo" width="150" height="150" alt="Profile picture of site author User 8734" />' contains "title="Foo"".
/tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/blogs/template.php:398
2) BP_Tests_Blogs_Template::test_bp_blog_get_avatar_title_attribute_should_default_to_user_displayname
Failed asserting that '<img src="//www.gravatar.com/avatar/0f7fb12f3f6751ae032aa127a118d4a9?s=150&r=g&d=mm" class="avatar user-127-avatar avatar-150 photo" width="150" height="150" alt="Profile picture of site author User 8766" />' contains "title="Profile picture of site author User 8766"".
/tmp/wordpress/src/wp-content/plugins/BuddyPress/tests/phpunit/testcases/blogs/template.php:427
FAILURES!
Tests: 1447, Assertions: 2545, Failures: 2, Skipped: 2.
Warning: Use --force to continue.
Aborted due to warnings.
The command "grunt $BP_TRAVISCI" exited with 3.
#5
@
9 years ago
Thanks @netweb.
Hi @boonebgorges I had to remove the title attributes from avatars, all of which already have alt attributes, to avoid extra noise to users of screen readers. Attached 7363-tests.patch removes the tests for the title attributes in blog avatars. For your approval.
#6
@
9 years ago
Tearing out the tests as in 7363-tests.patch seems fine to me.

Attached patch removes redundant
titleattributes from links as well as from all avatars which already havealtattributes read by screen readers.