-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix accessibility issues #77
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit e48bbe9.
✅ Deploy Preview for astro-new ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
sarah11918
approved these changes
Nov 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking in Chrome, the new site feels overall more readable!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is an omnibus PR fixing accessibility paper cuts and improving UX.
Non-visual changes
The following changes address assistive technology compatibility or other technical mark-up details but do not introduce visual differences comparing to the live site:
overflow-x-clip
instead ofoverflow-x-hidden
in browsers that support it to avoid the main content being focusable in browsers that automatically make elements focusable if they overflow.aria-hidden="true"
in “Open in…” drop-down menus.sr-only
text overtitle
attributes in “Open in…” drop-down menus. (Improved support for AT + things like browser auto-translation.)<h1>
for assistive technology. Until now the “astro.new” text in the page header was an<h1>
for the entire page. That is now regular paragraph text, so that the page gets a descriptive top-level heading.width
attributes so if CSS fails they don’t take up the entire viewport.Visual changes
Darken “Open in StackBlitz” button backgrounds slightly so they pass text contrast requirements.
Add a “Skip to content” link at the start of the document so keyboard users can jump over repeated introductory content to the main page content. Tabbing into the page reveals it in the top-left corner:

Redesign the three “resource” cards (docs, themes, community) at the bottom of the page so they can pass color contrast requirements.
The current designs are super fun and bright, but basically impossible to get passing colour contrast on without dimming them and losing their vibrancy. The redesign retains the same structure, but limits the splash of colour to the icons.
I also removed the gradient from the CTA button text on these cards as the purple shade here also fails colour contrast requirements.
Before
After
Other elements on the page with borders have also been updated to match the borders used on these new card designs. This is a subtle, mostly imperceptible change, but it exchanges a dim gray border (
border-astro-gray-500
) for a mostly transparent bright gray border. This allows any colours in the background to shine through when present.This is most noticeable in the bottom border on the navigation “tab bar” where it passes over the yellow background glow:
Browser testing
Tested on: