RedHat-UX / red-hat-design-system

Red Hat's Design System
https://ux.redhat.com
MIT License
103 stars 20 forks source link

[feat]: `<rh-jump-links>` ready to migrate #539

Open markcaron opened 2 years ago

markcaron commented 2 years ago

Tag Name

pfe-jump-links

RHDS Only

Additional Info

Current design specs 2022 study about jump links on redhat.com

To do

markcaron commented 1 year ago

@bennypowers I believe you had an idea on implementation on this, so we'll need your advisement.

marionnegp commented 1 year ago

@coreyvickery and I will have to update the docs too.

markcaron commented 1 year ago

While discussing Jump Links with @Nouveau today, we realized that we're likely going to run into an issue with Jump Links and color-palette / color-context as it remains sticky and slides over different colored "bands" (i.e. dark and light). This may mean that Jump Links must have a background color, otherwise the context switching as the user scrolls will never work well (or be 100% accessible).

CC: @marionnegp @coreyvickery @nikkimk @jvanpelt

marionnegp commented 5 months ago

On my smaller laptop screen, jump links with many items end up getting cut off. The jump links on the All products page just barely fits if I make my window fullscreen.

Screenshot 2024-06-17 at 3 43 53 PM

Dan suggested potentially decreasing the padding for each item.

markcaron commented 1 month ago

After our <rh-jump-links> discovery meeting last week...

We discussed the following problems:

  1. Sticky scroll over top of inverted color-palettes / themes (e.g., bands) causes accessibility / contrast issues
  2. Long lists of links can get cut-off
  3. Orientation back to the menu. Sighted keyboard users will have a difficult time navigation back "up" to the nav. Screen reader users should be able to get to the nav via its landmark.
  4. Layout issues across media and container queries with handling the switch from vertical to horizontal, since the layout exists outside of the component itself.

And we came to the following decisions:

  1. Jump Links won't solve page layout issues. If using the vertical variant, it will remain vertical across all media and container queries. Same for horizontal, though we can provide an overflow/scroll somewhat similar to Subnav and Tabs.
  2. Sticky positioning and scrollspy features will be pattern-based add-ons.
  3. Jump Links will use the <nav> role internally as a built-in landmark.
  4. Documentation guidelines will strongly advise that implementers add "back to nav" type links to each section referenced in the Jump Links nav. These have to be manually added (at least for now).
  5. Documentation will suggest limiting the nav to a certain numbers of items (TBD, but likely 7) to keep the menu easy to understand and less likely to cause overflow issues.
  6. Documentation will suggest that you implement horizontal Jump Links when you have "bands" of content or alternating themed sections on pages AND when you're making them "sticky".
  7. Design will update the Jump Links component design to include a background color behind the links with a drop shadow (on light) and border (on dark) when "sticky".
markcaron commented 4 weeks ago

Waiting on design updates (#7 above)

CC: @marionnegp @coreyvickery

coreyvickery commented 3 weeks ago

@markcaron Marionne will be taking on this work.