Skip to content

Further landing accessibility improvements#330

Merged
michellbrito merged 6 commits into
oven-sh:mainfrom
tropicaaal:a11y
Jul 8, 2022
Merged

Further landing accessibility improvements#330
michellbrito merged 6 commits into
oven-sh:mainfrom
tropicaaal:a11y

Conversation

@tropicaaal

@tropicaaal tropicaaal commented Jul 7, 2022

Copy link
Copy Markdown
Contributor

This PR improves the following potential accessibility pitfalls on the site:

  • Adds lang="en" to <html> which helps screenreaders correctly identify the site's language.
  • Adds a <ul> element to the navbar so their children <li>s have valid semantic meaning.
  • Removes <li> elements from benchmarks tabbar as ARIA requires the tablist role's direct children to have tabitem roles, making them redundant and potentially harmful to screenreaders. This also inadvertently fixes a regression with some missing selection styling introduced by fix a11y issues on landing #225.
  • Adjusts the text color of tag links to better contrast against their respective backgrounds.
  • Refactors InstallBox to not use IDs since it's used multiple times for mobile/desktop, resulting in invalid (well, more unorthodox) HTML, that could behave strangely.
  • Removes the unselectable class repetition from CodeBox and just slaps a user-select: none; on it's base element to simplify things CSS-wise.
  • Iterates over the copy button to ensure that all instances get the listener (unsure if this is required since mobile removes hides the second potential instance.)

@tropicaaal

tropicaaal commented Jul 7, 2022

Copy link
Copy Markdown
Contributor Author

Also, this is more of an SEO thing, but according to lighthouse the page is also missing a <meta name="description"> tag. Not sure if the existing OpenGraph metatag would cover this, but I can add this in another PR if needed.

@michellbrito michellbrito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Tropix126 mind posting screenshots of the following

  • before/after lighthouse report
  • before/after how the website looks

@alexkuz

alexkuz commented Jul 8, 2022

Copy link
Copy Markdown
Contributor

Lighthouse report

Before After
image image

@tropicaaal

tropicaaal commented Jul 8, 2022

Copy link
Copy Markdown
Contributor Author

Visual Changes - Only thing changed are these chip colors for better contrast.

Before After

@tropicaaal

tropicaaal commented Jul 8, 2022

Copy link
Copy Markdown
Contributor Author

Also: it's worth noting that the 98 in the "after" LH score is likely caused by the comment color used in the site's syntax theme. Since shiki renders these on build through inline styles, and it's pretty low priority I don't think i'll touch that in this PR.

image

@alexkuz

alexkuz commented Jul 8, 2022

Copy link
Copy Markdown
Contributor

@Tropix126 nah, it's that pink tag. I think we can ignore WCAG 2.0 lies on that one :)

@michellbrito michellbrito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@michellbrito michellbrito merged commit b373126 into oven-sh:main Jul 8, 2022
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