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 Skip to content link focus on main content #4146

Merged
merged 2 commits into from
Nov 6, 2019
Merged

Conversation

Dananji
Copy link
Contributor

@Dananji Dananji commented Nov 5, 2019

Fixes #3774

When a user use tab key on Skip to content link in Firefox, it does not shift the keyboard to focus to main content, even though the view is focused. The user has to go through all the navigation links to reach the main content.

Changes proposed in this pull request:

  • Use JavaScript on the click event of Skip to content link to change keyboard focus to the main content

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • Open Hyrax in Firefox
  • Press Tab key and then Enter
  • Press Tab again to see the focus is skipped to main content

@samvera/hyrax-code-reviewers

@Dananji Dananji marked this pull request as ready for review November 5, 2019 18:40
@Dananji Dananji changed the title Make skip to content focus on main content Make Skip to content link focus on main content Nov 5, 2019
@no-reply no-reply self-requested a review November 5, 2019 21:10
Copy link
Contributor

@no-reply no-reply left a comment

Choose a reason for hiding this comment

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

let's get rid of the errant whitespace. otherwise 🚀

Co-Authored-By: Tom Johnson <tomjohnson@ucsb.edu>
@no-reply no-reply merged commit 708ffe3 into master Nov 6, 2019
@no-reply no-reply deleted the issue-3774 branch November 6, 2019 06:45
@dlim87
Copy link

dlim87 commented Nov 7, 2019

I'm not 100% sure what the intended behavior for this ticket is, but it is behaving in a way that seems to be working in most cases:

On the home page: it takes you to right before "share your work", skipping the navbar
on a works page: it takes you to right before "add to collection", skipping the thumbnails to be right after the work's title
on a collection page: it takes you to right before the "search subcollections and works" search bar, right after the title
On a search page, it takes you to right before the pagination controls at the top of the page, skipping the sidebar

However, I'm not sure it's really working in the dashboard, since it looks like for the pages there, it takes you out of the page, since the next tab is interacting with my bookmarks toolbar

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.

Skip to Content link doesn't always set keyboard focus
3 participants