Skip to:
Content

#7363 closed enhancement (fixed)

Accessibility: Remove redundant `title` attributes Part 2

Reported by: mercime Owned by: mercime
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)

https://cldup.com/P78F0P6ooB.png

Attachments (5)

7363.patch (9.3 KB) - added by mercime 12 months ago.
7363.2.patch (8.6 KB) - added by mercime 11 months ago.
Leaves off removing title attr from bp_core_get_userlink to double-check
7363-tests.patch (1.9 KB) - added by mercime 11 months ago.
7363.3.patch (770 bytes) - added by mercime 11 months ago.
One more redundant title attribute
7363-bp-core-userlink.patch (649 bytes) - added by mercime 11 months ago.
Removal of title attr is good to go

Download all attachments as: .zip

Change History (14)

@mercime
12 months ago

#1 @mercime
12 months ago

  • Keywords has-patch added

Attached patch removes redundant title attributes from links as well as from all avatars which already have alt attributes read by screen readers.

#2 @DJPaul
11 months ago

  • Keywords commit added

Looks good to me.

@mercime
11 months ago

Leaves off removing title attr from bp_core_get_userlink to double-check

#3 @mercime
11 months ago

In 11381:

Accessibility: Remove redundant title attributes from avatars and links.

See #7363.

#4 @netweb
11 months ago

r11381 broke 2 unit tests:

See https://travis-ci.org/buddypress/BuddyPress/jobs/191170773

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&#038;r=g&#038;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&#038;r=g&#038;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 @mercime
11 months 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.

@mercime
11 months ago

One more redundant title attribute

@mercime
11 months ago

Removal of title attr is good to go

#6 @boonebgorges
11 months ago

Tearing out the tests as in 7363-tests.patch seems fine to me.

#7 @mercime
11 months ago

Thank you @boonebgorges. Committing the patches in a few minutes.

#8 @mercime
11 months ago

In 11385:

Accessibility: Remove redundant title attributes from user and message links.

See #7363.

#9 @mercime
11 months ago

  • Owner set to mercime
  • Resolution set to fixed
  • Status changed from new to closed

In 11386:

Remove unit tests for title parameters in blog avatars.

The unit tests are no longer needed because we have removed title
attributes from blog avatars in r11381.

Fixes #7363.

Note: See TracTickets for help on using tickets.