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

A11y (Serious): sticky Sidebar header and Dialog title #7008

Open
1 task done
nokSage opened this issue Oct 9, 2024 · 7 comments
Open
1 task done

A11y (Serious): sticky Sidebar header and Dialog title #7008

nokSage opened this issue Oct 9, 2024 · 7 comments

Comments

@nokSage
Copy link

nokSage commented Oct 9, 2024

Description

  • When:

    • using header props in the Sidebar component, or title props in Dialog
    • the content inside is tall enough

    Both headers shown in these component will be sticky. This causes issues to low-vision user when they need to zoom the page to 400%, because a large amount of the screen is taken up by the header, and they cannot easily scroll to see the full content below.

  • I am submitting a PR for this issue

Reproduction

https://stackblitz.com/edit/parsium-carbon-starter-mqyavq

Steps to reproduce

  • Go to the provided Stackblitz URL
  • Click on the Open sidebar or Open dialog button
  • Zoom the page to 400%
Screen.Recording.2024-10-09.at.16.28.16.mov

JIRA ticket numbers (Sage only)

SBS-109921

Suggested solution

  • Change the current sticky behaviours to make it fully scrollable on the page.
  • I have tested locally in the browser and should only require a few lines of changes in the style props.
Screen.Recording.2024-10-09.at.16.31.38.mov

Carbon version

142.13.5

Design tokens version

4.29.0

Relevant browsers

Chrome

Relevant OSs

MacOS

Additional context

No response

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.
@Parsium
Copy link
Contributor

Parsium commented Oct 15, 2024

Note for triage: The mentioned PR does not provide a fix for this issue

@tomdavies73
Copy link
Contributor

tomdavies73 commented Oct 15, 2024

@harpalsingh @ljemmo hi both, this appears to be an issue where the Design System states a header has to be sticky, but in an accessibility audit it is recommended that non-sticky headers are used for users utilising a high zoom.

Could we provide some functionality to enable headers to be non-sticky, or should consumers not be using a header in this instance? Cheers

@tomdavies73
Copy link
Contributor

@ljemmo @harpalsingh, hi guys, any update on this?

@ljemmo
Copy link
Contributor

ljemmo commented Dec 3, 2024

Hi @nokSage and @tomdavies73 - I agree that the sticky header isn't great for that scenario. However, i have concerns that we will be hamstringing the vast majority of users if we remove the sticky header functionality.

We are starting to explore responsive typography using clamp values. Please could you investigate in your example whether the issue is as pronounced if this clamp value is applied to the header? clamp(1.26rem, 1.1999rem + 0.3006vw, 1.5606rem)

If it is resolved, i would suggest we park this until the new responsive type approach is implemented (final clamp values TBC)

@nokSage
Copy link
Author

nokSage commented Dec 5, 2024

@ljemmo Thanks for the reply. Unfortunately I don't see changing the header's font will help much, because our use case also has a <Form> inside with stickyFooter. This combination will block the entire screen.

Demo: https://stackblitz.com/edit/parsium-carbon-starter-4h1bus?file=src%2FApp.tsx

Screenshot 2024-12-05 at 16 02 16

Could we have an option of passing an optional prop in to disable the sticky behaviour of the header, so it does not affect other places that relies on the sticky behaviour?

@nicktitchmarsh
Copy link
Contributor

@ljemmo, in this instance perhaps an optional disableStickyHeader prop on these two components? If you agree I'll get a ticket raised for this, then we can provide an example useMediaQuery Hook that can conditionally switch this off?

@ljemmo
Copy link
Contributor

ljemmo commented Dec 13, 2024

@nicktitchmarsh i think before we go down that approach, i'd like to discuss one final alternative to see if that could work for nok.

@nokSage The accessibility guys don't really like the use of sticky footer at all. There's been lots of discussions about removing that functionality at some point. If you remove the sticky footer, reduce header font as previously discussed and reduce the top and bottom padding on the header, could that enable it to work without having to remove header stickyness?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants