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

Make focus management in sidebar optional #5707

Closed
andrei-gheorghiu opened this issue Aug 28, 2020 · 1 comment · Fixed by #5734
Closed

Make focus management in sidebar optional #5707

andrei-gheorghiu opened this issue Aug 28, 2020 · 1 comment · Fixed by #5734

Comments

@andrei-gheorghiu
Copy link
Contributor

andrei-gheorghiu commented Aug 28, 2020

First off, a huge thank you for the time and effort you put into developing this lib. It's impressive, to say the least.

Is your feature request related to a problem? Please describe...

I'm currently developing an app where I have very specific accessibility needs for people with disabilities. The sidebar is unusable, because of its "accessibility". It steals the focus in cases where this is detrimental for the experience of people using screen readers and/or for people with impaired movement/typing ability.

While for many apps the default behavior is useful, I believe you should allow developers (and UX designers) to decide when to use that behavior and when not to, by providing a config option to disable focus management altogether for a sidebar. Enforcing accessibility can actually be quite disabling and detrimental to accessibility.

The only option I currently have is to clone your component and remove focus management. I doubt that's how you meant your library to be used.

Describe the solution you'd like

Just provide a custom prop to disable focus management altogether.


As a side-note, even if you do add this feature in, it probably won't be shipped in time for my current app, So I'll have to poke around in source code anyway.
If there's nothing I don't understand, I might PR this feature. If, of course, you welcome it. But I don't want to promise anything before I look at the code.

Again, big thank you. Keep up the good work!

@jacobmllr95
Copy link
Member

BModal supports a noEnforceFocus property to give the user control over the auto-focus behavior.
We should support this on the BSidebar component as well.

jacobmllr95 pushed a commit that referenced this issue Sep 4, 2020
* Update readme.md

* update sidebar.js

* update package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants