pressbooks / pressbooks-book

McLuhan is the default book theme for Pressbooks.
https://pressbooks.org
GNU General Public License v3.0
20 stars 16 forks source link

Accessibility-related "Skip to Content" button doesn't work as expected #749

Closed pb-amy closed 3 years ago

pb-amy commented 3 years ago

Description

This issue was mentioned in this client interaction: https://pressbooks.zendesk.com/agent/tickets/4704

Pressbooks-book allows visitors to books to 'jump over' several navigation links by clicking a link called "Skip to Content": https://github.com/pressbooks/pressbooks-book/blob/11a14c360ab193862661fb9595d065c9665ff36b/header.php#L57

After pressing enter on "Skip to Content", you would be taken to the content of the page. From here, upon pressing 'tab', each time, you'd ideally be be sequentially taken through all of the links throughout the page.

What happens in actuality is that when you press enter on "Skip to Content", it takes you to the content. However, upon pressing tab, it takes you back to the "Skip to Content" button at the top of the page instead of taking you to the next link on the page, forcing the user to re-navigate down the page again.

You can see this on this video - I press 'tab' when the video starts, which enables the "Skip to Content" button to show. Then I press enter, which takes me to content (good), but once I'm on my content, I press 'tab' again, and it takes me back up to "Skip to Content" instead of the next link in my chapter. FYI, this forum discussion in Joe Dolson's accessibility plugin describes exactly what happens on Pressbooks: https://wordpress.org/support/topic/skip-to-content-5/ (there, Joe Dolson suggests that Smooth Scroll JavaScript in another WordPress theme breaks the desired keyboard focus behaviour).

Steps to Reproduce

  1. Press 'Tab' on any Pressbooks chapter
  2. Press 'Enter', once "Skip to Content" appears
  3. You will be taken down to the content. Press 'Tab' again.

Expected behavior After step 3, you should be taken to the next link in the content

Actual behavior: After step 3, you are taken back to the "Skip to Content" button.

SteelWagstaff commented 3 years ago

Tested and working as expected on integrations.