Skip to content
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

[Redesign] Improve Lighthouse score #8707

Merged
merged 2 commits into from
Jul 28, 2021
Merged

[Redesign] Improve Lighthouse score #8707

merged 2 commits into from
Jul 28, 2021

Conversation

loic-sharma
Copy link
Contributor

@loic-sharma loic-sharma commented Jul 27, 2021

Lighthouse is a tool to check a website follows best practices: https://developers.google.com/web/tools/lighthouse

Category Score before Score after Change
Performance 100 100 -
Accessibility 96 100 +4
Best practices 80 87 +7
SEO 91 100 +9

Remaining issues I did not address:

Addresses #8605

@loic-sharma loic-sharma requested a review from a team as a code owner July 27, 2021 00:08
@@ -1056,7 +1060,7 @@
<i class="ms-Icon ms-Icon--FabricFolderSearch" aria-hidden="true" aria-label="@disclaimer" title="@disclaimer"></i>
<a href="@Model.NuGetPackageExplorerUrl" data-track="outbound-nugetpackageexplorer-url"
aria-label="open in NuGet Package Explorer"
title="Explore additional package info on NuGet Package Explorer" target="_blank" rel="nofollow">
title="Explore additional package info on NuGet Package Explorer" target="_blank" rel="nofollow noreferrer">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This improves privacy and security.

See: https://stackoverflow.com/questions/50773152/when-should-i-use-rel-noreferrer
See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel

rel value Description
nofollow Indicates that the current document's original author or publisher does not endorse the referenced document.
noreferrer No Referer header will be included. Additionally, has the same effect as noopener.
noopener Creates a top-level browsing context that is not an auxiliary browsing context if the hyperlink would create either of those, to begin with (i.e., has an appropriate target attribute value).

@if (!Model.Owners.Any())
{
@ViewHelpers.AlertWarning(@<text>This package has no owners and is not being actively maintained.</text>)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously we would nest a <div> in a <ul> if the package had owners. That is not a best practice

@@ -137,6 +137,10 @@
}
}

@section Meta {
<meta name="description" content="@Model.ShortDescription">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This improves our SEO

@loic-sharma loic-sharma merged commit 460867c into dev Jul 28, 2021
@loic-sharma loic-sharma deleted the loshar-lighthouse branch July 28, 2021 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants