[wp-trac] [WordPress Trac] #51299: Remove the title attribute from Walker_Nav_Menu

WordPress Trac noreply at wordpress.org
Thu Sep 24 11:18:38 UTC 2020


#51299: Remove the title attribute from Walker_Nav_Menu
---------------------------------------+-----------------------------
 Reporter:  Hareesh Pillai             |       Owner:  Hareesh Pillai
     Type:  defect (bug)               |      Status:  assigned
 Priority:  normal                     |   Milestone:  5.6
Component:  Menus                      |     Version:
 Severity:  normal                     |  Resolution:
 Keywords:  title-attribute has-patch  |     Focuses:  accessibility
---------------------------------------+-----------------------------

Comment (by afercia):

 I'd agree there are backwards compatibility concerns here.

 So far, in the last years the accessibility team made an effort to
 [https://core.trac.wordpress.org/query?keywords=~title-attribute remove as
 many title attributes as possible] from files in the `wp-admin` directory.
 As mentioned on the tracking ticket #24766, that brought down the
 occurrences of title attributes in the `wp-admin` codebase from 157 in 37
 files to 16 occurrences. We can't just remove them.

 It would be nice if WordPress would have a well established deprecation
 policy for this kind of things. Given the lack of it, I'd tend to think
 there's the need to explore a way to make these changes in a non-breaking
 way.

 I'm not sure a new theme-support item would be the best option, as it
 would restrict important accessibility improvements only to the themes
 that declare support for that option. Also, I've seen plugins
 (incorrectly) using title attributes for all sort of things, for example
 image gallery plugins. It would be great to explore new ideas to make the
 removal of title attributes not break anything. Any suggestions welcome :)

 However, when it comes to title attributes in the `wp-includes` directory,
 things are pretty different. Most of these title attributes are used in
 functions meant to be used in the front end.

 Replying to [comment:5 SergeyBiryukov]:
 > * I think this will have big front-end implications for a lot of
 websites. For example, https://wordpress.org/ has these title attributes
 on some menu items. With this change, would they be gone?
 >  * Documentation: "Documentation, tutorials, best practices."
 >  * Forums: "Support and discussion forums."
 >  * Five for the Future: "How five percent is powering the next
 generation of the web"[[BR]]

 For the specific case of wp.org, in
 https://meta.trac.wordpress.org/ticket/4091 the accessibility team asked
 to remove the title attributes from the menu and that was done for the top
 level items. It appears the sub-items were missed :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51299#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list