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

SI: focusing on #flashed message after submitting sometimes scrolls the viewport too far, may obscure message #6333

Closed
eaon opened this issue Mar 10, 2022 · 0 comments · Fixed by #6336

Comments

@eaon
Copy link
Contributor

eaon commented Mar 10, 2022

Description

First identified by @eloquence in #6306, the message we want to draw attention to may get scrolled out of view when we use #flashed as the anchor so screen-readers would know where to put their attention to first.

Steps to Reproduce

  • Visit index with Tor Browser, JavaScript disabled
  • Inspect the html element with the Web Developer Tools
  • Using the layout tab, make sure that the content size of the html element is 1000x540 (when no scrollbar is visible)
  • Add a new submission, see most of the Success! flashed message disappear

Expected Behavior

Flashed message stays in view

Actual Behavior

flash

Originally posted by @eloquence in #6306 (comment)

Comments

@cfm highlighted that this is probably due to changes from #6041, and IMO we don't want to leave screen-reader users to figure out themselves what's going on. The page 53 of WCAG 2.1 Audit already describes an option that we can probably handle in time for 2.3.0:

We already have a Skip to main content link which we could either combine with or add to with another link specifically to jump to #flashed if get_flashed_messages() isn't empty.

@eaon eaon changed the title Source Interface: viewport doesn't scroll SI: focusing on #flashed message after submitting sometimes scrolls the viewport too far, may obscure message Mar 10, 2022
@cfm cfm closed this as completed in #6336 Mar 10, 2022
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 a pull request may close this issue.

1 participant