-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove title attributes from Walker_Nav_Menu
#7413
Remove title attributes from Walker_Nav_Menu
#7413
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
51299.2.diff compared the title attribute against the item title, filtered only by This PR now checks the title attribute after both |
The value that is rendered is the version that's passed through both filters, and if we want to prevent duplicate values, we should generally pass through both filters. However, Twenty Seventeen inserts an icon using the Because of that, I'm wondering if we actually want to get those as two separate variables and compare against both of them, ignoring the title attribute if it matches either value. |
That might be why I moved the comparison earlier in 51299.2.diff.
Maybe. Switching |
I think that the most valid use case of this attribute is where it definitely provides something other than the link text, and that shouldn't generally overlap with text that might be shown visually. I'd rather err in the direction of removing more title attributes than less. |
In r59177 |
Removes redundant tooltips from
Walker_Nav_Menu::start_el()
Trac 51299
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.