fix(v2): Allow the alt for the logo to be empty #3352
Merged
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.
Motivation
See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img#Attributes
Since the logo is indeed decorative and redundant with the actual
project name, an empty alt is fine.
We could also consider just making the attribute optional and defaulting to an empty string, since the logo is going to be redundant with
title
in the general case. I'm happy to update the PR to that, but since just allowing the empty string was the approach described in #3350, I went with that for now.Fixes #3350.
Have you read the Contributing Guidelines on pull requests?
Yes.
Test Plan
Run the unit tests. Set up a new project, set the alt property for the logo in the navbar and footer to an empty string, then verify that it is not rejected.