Block Library: Navigation: Remove title attribute from navigation link#19990
Merged
Block Library: Navigation: Remove title attribute from navigation link#19990
Conversation
Member
Author
|
Related: #18061 (comment) Removing this attribute would cause the LinkControl link previews to no longer show the title associated with a link. However, as I mentioned in the linked comment, this seems like a problem that needs to be addressed generally for all LinkControl, and not be made a responsibility of individual blocks. |
draganescu
approved these changes
Feb 4, 2020
Contributor
draganescu
left a comment
There was a problem hiding this comment.
The code is good and the block is unaffected other than not setting titles on links. LGTM!
Contributor
|
@aduth there are some conflicts here apparently because of the new linting updates in master. Everything else is good to go. |
b2423f9 to
2a187c8
Compare
Member
Author
|
Thanks @draganescu . I've force-pushed a rebased branch, so it should be all clear now. |
This was referenced Feb 7, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously: #19735, #17352, #19462 (comment), #19490 (comment), #616
This pull request seeks to remove the
titleattribute from the Navigation Link block.For more context, refer to #19735, which includes additional resources for why we should be avoiding the
titleattribute for links.Note: To disambiguate, the Navigation Link block will still handle a
titlefrom a suggestion in theLinkControlinput that it renders. From what I can tell, this is used to assign a default text label of the link. I expect thatLinkControlwill still continue to offer atitlevalue when the selected link changes. This is consistent from what is reported by the search results endpoint and can be useful for these sorts of scenarios in using e.g. a post title. This is not to be confused with thetitleHTML attribute, which we should seek to avoid foraanchor tags.There is not expected to need to be a deprecation here, since the title was used in the dynamic server-side rendering and not in the saved static markup of the block.
Testing Instructions:
Verify that there are no regressions in creating, saving, and previewing a post containing a Navigation and Navigation Link block: