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

Lighthouse score improvements #934

Merged
merged 7 commits into from
Mar 21, 2023
Merged

Conversation

codemonkey800
Copy link
Collaborator

@codemonkey800 codemonkey800 commented Mar 8, 2023

Description

#898

Improves Lighthouse scoress. This includes various changes such as:

  1. Converting ul to div to fix descendant errors
  2. Adding aria-label props to buttons and links
  3. Only pass HTML props to HTML elements
  4. Fix ordering of headings h1 - h6

Unfortunately, this only impacts Accessibility scores. To improve the best practices score, we'll need to enable source maps in production which is not working with our current version of Next.js. SEO scores are pretty good for most pages, the only thing we need to do is improve the font size for collection pages. All follow up work is listed below or in #898 (comment)

Demos

Home Page

Before

image

After

image
Plugin Page

Before

image

After

image
Collection Index Page

Before

image

After

image
Collection Page

Before

image

After

image
Markdown Pages

Before

image

After

image

Follow ups

Opened follow up issues found during profiling:

@codemonkey800 codemonkey800 added the improvement Release Label: Used for categorizing improvements in automated CI release notes label Mar 8, 2023
@codemonkey800 codemonkey800 marked this pull request as ready for review March 8, 2023 23:42
@@ -15,8 +15,6 @@ exports[`<PluginComplexFilter /> should match snapshot 1`] = `
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium text-black w-full flex justify-between p-0 pb-2 css-1kjmhix-MuiButtonBase-root-MuiButton-root"
data-testid="button"
label="pluginData:labels.operatingSystem"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we remove this part?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we've been getting errors on the home page saying that we can't pass the sdsStage prop to native DOM elements, so this is fixed in this commit: 73cb567

As a result, some other props aren't being passed like label, but that's fine because we don't want to pass those props to the <button> element anyway

@codemonkey800 codemonkey800 merged commit 37fa655 into main Mar 21, 2023
@codemonkey800 codemonkey800 deleted the jeremy/lighthouse-improvements branch March 21, 2023 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Release Label: Used for categorizing improvements in automated CI release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants