Stacks icon indicating copy to clipboard operation
Stacks copied to clipboard

fix(a11y): Add bold font to selected nav items

Open qheaden-stack opened this issue 7 months ago • 5 comments

STACKS-755, Partially resolves A11Y-15

qheaden-stack avatar Apr 04 '25 13:04 qheaden-stack

Deploy Preview for stacks ready!

Name Link
Latest commit d0fc4331628bb96892618608ab4ae8d4cd32cbb9
Latest deploy log https://app.netlify.com/projects/stacks/deploys/682757e01a35a60007160649
Deploy Preview https://deploy-preview-1894--stacks.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Apr 04 '25 13:04 netlify[bot]

@CGuindon I wanted to raise a design concern with you and see how/if we want to address it.

With the addition of the hidden bold text to maintain a consistent size for navigation items between selected states, the items are now all a bit wider:

Before (361px wide)

image

image

After (378px wide)

image

image

This has two potential issues:

  1. This is not the intended design
  2. This could possibly cause layout shifts from what we currently have (this could make the update in Core kinda a pain if we need to mitigate any new undesirable overflow/wrapping)

This issue could potentially be partially mitigated by reducing the gap between navigation items:

With gap reduced from 4px to 1px (366px wide)

image

image

The compromise is that hover state reveals that the navigation items are closer together. I'm happy to brainstorm other ideas or just leave it as-is if that seems right.

dancormier avatar Apr 04 '25 22:04 dancormier

@dancormier I don't think we can reduce the spacing to 1px — I believe this might cause issues with the focus state (the blue ring adds 1-2 px on the outside sometimes?). I'm honestly not too worried about the navigation get a tiny bit wider. Navigations are already wrapping for responsive screen sizes — I'd be curious to first see if there are any pages where the nav perfectly fits right now and it becomes a big issue for a regular desktop size.

CGuindon avatar Apr 07 '25 15:04 CGuindon

🦋 Changeset detected

Latest commit: d0fc4331628bb96892618608ab4ae8d4cd32cbb9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stackoverflow/stacks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Apr 25 '25 12:04 changeset-bot[bot]

Note: This change is ready but we're delaying merging until prep work has been completed in Core.

dancormier avatar May 19 '25 19:05 dancormier