CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Navigation Link, Navigation Submenu: Remove the title attribute controls #69689
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
Navigation Link, Navigation Submenu: Remove the title attribute controls #69689
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
The failing tests don’t seem to be related to the changes in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I think it would be good to focus only on two blocks, core/navigation-link
and core/navigation-submenu
in this PR.
If we plan to remove the title
attribute from the Image block, we need to address the following tasks:
- If we update the save function, we will need to add a block deprecation.
- The
title
attribute is allowed to be used as Block Binding API (See this core code). This means that we may need to prepare a patch that removes thetitle
attribute from the supported attributes to the core along with this PR.
I think It's too big to tackle all the tasks in one PR.
Hi @t-hamano, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to completely remove code related to the title
attribute. For example:
gutenberg/packages/block-library/src/navigation-link/index.php
Lines 252 to 254 in d8545b2
if ( isset( $attributes['title'] ) ) { | |
$html .= ' title="' . esc_attr( $attributes['title'] ) . '"'; | |
} |
title, |
It's a good idea to go through the code in both blocks and look for anything that needs to be removed.
Hi @t-hamano, Thank You! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I think all code related to the title
attribute has been removed.
Since I think this change is very important for site builders, I'm adding a Needs dev note
label to announce it in the next major release.
…ols (WordPress#69689) * Remove Title attribute controls * Remove Title controls from Image component * Remove 'title' attribute from navigation link and submenu blocks * Remove title attribute checks from custom sources tests * Revert image changes * Remove `title` attribute from navigation link and submenu blocks Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: carolinan <poena@git.wordpress.org> Co-authored-by: joedolson <joedolson@git.wordpress.org>
…ping attribute support (WordPress#70234) * Revert the changes from PR WordPress#69689 * Remove title attribute from Controls in Navigation Link and Submenu blocks Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Closes: #69663
What?
Removes the Title attribute UI option from Navigation Submenu block and Custom Link button to align with accessibility best practices.
Testing Instructions
Screenshots or screencast