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

Brand Context visually hidden mixin has browser scroll issue #841

Open
benjclark opened this issue Oct 31, 2022 · 1 comment
Open

Brand Context visually hidden mixin has browser scroll issue #841

benjclark opened this issue Oct 31, 2022 · 1 comment
Labels
stale this issue is more than 30 days old

Comments

@benjclark
Copy link
Contributor

benjclark commented Oct 31, 2022

Further to #823 (comment)

I have noticed that the existing u-visually-hidden mixin has an issue whereby if you tab through the content of a page and tab onto an element that has those styles, the browser scrolls to the top of the page. Presumably this is because that is effectively where the element is located (out of view) with that styling applied.

Global Forms and Global Ratings Survey have not used the mixin and instead use this technique:

clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;

which achieves the same thing but does not have the same scroll issue upon tab.

It feels to me like we should:

  1. Investigate the issue I described with the current visually-hidden mixin
  2. Assess whether we should replace the existing mixin code with the code above
  3. (if and when we update the mixin) Update components that use the new technique to use @include u-visually-hidden instead

For a demonstration of this issue, edit the Global Forms component Sass locally to use the mixin and generate the demo html. Then tab through the demo page until you reach the radio inputs.

@sturobson
Copy link
Contributor

There has been no update on this issue for 30 days. It is now marked as "stale". If you think this issue is still relevant and needs attention then reply with an update. If there is no update in 14 days, this issue will be closed.

@sturobson sturobson added the stale this issue is more than 30 days old label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale this issue is more than 30 days old
Projects
None yet
Development

No branches or pull requests

2 participants