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

202408 skiplink ios keyboard #587

Conversation

anthonylindsay
Copy link
Contributor

What does this change?

This is a workaround for an IOS/keyboard navigation bug which means focus never really gets to main content when using the skip link, and keyboard-navigation IOS users effectively cannot use the skip link.

It forces focus and a tabindex 0 value on the main content element. It also introduces an <a> as the target for main content, rather than <main>

How to test

This is primarily only testable with the correct hardware: an IOS device & external keyboard.

  1. Load a page.
  2. Navigate to the skip link
  3. Hit ENTER to activate it.
  4. Verify that you have been brought to the main content area (i.e. past main nav/header)
  5. Hit TAB again.
  6. Verify that focus is now on the next available link or focusable element within main content.

NB

  • It is worth testing with a regular ol' browser via keyboard navigation and mouse click to make sure there is no regression.
  • It can only really be validated with the correct hardware.

@anthonylindsay
Copy link
Contributor Author

closing as there's a better way: tabindex=-1

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.

1 participant