Block Library: Navigation: Remove title attribute from navigation link #19990
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: