Devographics / Monorepo

Monorepo containing the State of JS apps
surveyform-sigma.vercel.app
Other
134 stars 52 forks source link

Difficult to quickly scroll pages for keyboard-only users #445

Open aardrian opened 3 weeks ago

aardrian commented 3 weeks ago

Issue

Typically a user loads a web page and can immediately start scrolling without the need to navigate into the page. Here, keyboard-only users have to move keyboard focus into the content area in order to scroll the page.

This is not a WCAG violation, but it is a hassle for keyboard-only users to peruse the page.

To reproduce

  1. Visit https://2024.stateofcss.com/en-US in a desktop browser.
  2. Prior to any other interaction, use the down arrow key () to scroll the page.
  3. Alternatively, press Space to scroll one screenful.
  4. Using Chrome, press Tab↹ until "Skip to Content" is in focus.
  5. Press Enter↵
  6. Press or Space to scroll the page.

Additional notes:

Suggestion

The following should / could resolve the issue.

Or I guess I could have just pasted this into the issue (which includes overrides for the things I could not remove):

.oPsli {
  overflow: unset;
}
#sidebar {
  position: sticky;
  top: 2.8em;
  height: calc(100vh - 2.7em);
}
.SurveyBanner__Banner_-sc-md19pk-0 {
  position: sticky;
  top: 0;
  z-index: 1;
}
.REBFc {
  overflow-y: initial;
  overflow: initial;
}
.cLQUPa:focus {
  z-index: 2;
  position: fixed !important;
  background: #000;
}

That CSS is from a custom style block I added to Stylus for the site in Firefox. It may not be perfect.