department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
282 stars 201 forks source link

Secondary nav wrapping issue w/ browser font settings #89944

Open sterkenburgsara opened 1 month ago

sterkenburgsara commented 1 month ago

Description

Some OCTO stakeholders noticed an issue with secondary nav links wrapping incorrectly in some browsers when fonts are enlarged / magnification is on. This is nominally an a11y issue.

Issue has been observed in:

User story

As a Veteran who has set my minimum font size larger than normal (e.g. 24px), I want the MHV navigation bar to display as expected, so that I can navigate the portal without any usability or additional cognitive load.

Notes

Possible tasks:

Acceptance criteria

jzucadi commented 1 month ago

PR: https://github.com/department-of-veterans-affairs/vets-website/pull/31188

wesrowe commented 1 month ago

@dcloud, I see a couple boxes checked in the possible tasks section, but no comments to support them. Can you please add anything you know in a comment here before memory fades?

dcloud commented 1 month ago

Just by looking at the description in Jim's PR, he had reproduced in Chrome and Safari. The proposed solution in there involved a JavaScript-heavy approach that required drawing some offscreen text and measuring text size.

I think a better approach would not require JavaScript, and we should investigate CSS-driven techniques that don't require writing a mini-rendering calculator

wesrowe commented 1 month ago

Because slack thread indicated a very low priority (a11y-level-4, at most), Patrick recommended putting this in the backlog and addressing later if time allows. Not worth much effort.