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
title
attribute from the Navigation Link block.For more context, refer to #19735, which includes additional resources for why we should be avoiding the
title
attribute for links.Note: To disambiguate, the Navigation Link block will still handle a
title
from a suggestion in theLinkControl
input that it renders. From what I can tell, this is used to assign a default text label of the link. I expect thatLinkControl
will still continue to offer atitle
value 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 thetitle
HTML attribute, which we should seek to avoid fora
anchor 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: