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

Make permalinks accessible #35

Closed
wants to merge 3 commits into from
Closed

Conversation

geoffrich
Copy link
Member

This updates how permalinks are rendered to resolve some of the Axe violations in sveltejs/svelte#5678.

Summary of changes:

  • Remove aria-hidden from permalinks. This fixes the Axe violation ARIA hidden element must not contain focusable elements
  • Add visually hidden text to each permalink so assistive tech knows what the link is
  • Move permalink code into a Svelte component and a markdown helper for dependent sites to consume (e.g. svelte.dev)
  • Make focus visible when focusing permalinks and edit links. Previously there was either no focus outline (on edit links) or the element still had opacity 0 (permalinks)
  • CSS cleanup
    • Remove commented out CSS
    • Remove non-standard zoom property. Including this property logs a console warning on firefox and is only needed for an IE bug
    • Remove rules related to linkify. I searched the project and it seems like linkify is no longer used. I can put these back if I'm wrong.

I'll be opening a separate PR for the svelte.dev site that is dependent on these changes.

base.css Outdated

/* visually hidden, but accessible to assistive tech */
.visually-hidden {
border: 0;
Copy link
Member

Choose a reason for hiding this comment

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

the indentation looks different here than elsewhere. it looks like you're using spaces while the existing files use tabs

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, fixed now

@@ -0,0 +1,7 @@
<script>
export let href;
Copy link
Member

Choose a reason for hiding this comment

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

spaces -> tabs

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed with latest commit

@benmccann
Copy link
Member

FYI, we're moving this repo to https://github.com/sveltejs/sites/tree/master/packages/site-kit. That location is currently used only for the SvelteKit docs, but we hope to eventually use it for all docs

@geoffrich
Copy link
Member Author

@benmccann sounds good -- should I re-create this PR over in that repo?

@benmccann
Copy link
Member

yeah, that'd be great. And I have merge rights in that repo, so if you close this one and open a new one there I can get it merged 😉

@geoffrich
Copy link
Member Author

Moved the PR to the new repo, so I'm closing this.

@geoffrich geoffrich closed this Apr 23, 2021
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.

None yet

2 participants