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

MessageBar: focusing an element that is hidden hides the rest of the content #8776

Closed
Vitalius1 opened this issue Apr 18, 2019 · 7 comments
Closed
Assignees
Labels

Comments

@Vitalius1
Copy link
Contributor

Environment Information

  • Package version(s): latest
  • Browser and OS versions: all

Please provide a reproduction of the bug in a codepen:

The issue can be seen on the Fabric web site and also isolated here: https://codepen.io/vitalius1/pen/vMjBpG

Actual behavior:

When tabbing with the keyboard on a collapsed MessageBar that has a focusable element hidden in the overflow, the focus goes to that element without showing it and also hides the rest of the content, similar to this demo:
2019-04-18 16 17 36
... after that, there is no possible way to make the content show again in a collapsed state even if you focus anything else.

Expected behavior:

The content should not disappear.

Priorities and help requested:

Are you willing to submit a PR to fix? (Yes, No)

Requested priority: (Blocking, High, Normal, Low)

@ecraig12345
Copy link
Member

@Vitalius1 Just to clarify, are you planning to fix this or just reporting it?

@Vitalius1
Copy link
Contributor Author

@ecraig12345 just reporting it because I have a deadline to meet on some fluent work. I honestly have no idea how to fix this. A link will be always focusable so how would you ever know if that link is in the overflow or not? Or even better why the browser is focusing on something that is not on the screen?

@ecraig12345
Copy link
Member

That's fine. First idea that comes to mind is that when any child of the MessageBar receives focus, it should expand if collapsed. Would have to look into whether that's practical.

@Vitalius1
Copy link
Contributor Author

Interesting approach... but what if the user does not want to have it expanded without him activating the expand button. Maybe he just wants to tab through the elements but never expand the full message. A very interesting accessibility question that maybe @betrue-final-final can have some input to share: do we automatically expand the collapsed MessageBar when having some focusable elements hidden in the overflow... or the user should be able to first navigate to the expand button and then expand it? What would be the tab order then?

@ecraig12345
Copy link
Member

Good point. Changing the tab order so the expand button (if available) comes first sounds reasonable to me--though I'd want to get input from someone more familiar with these type of issues on the best way to do it. (I vaguely remember hearing that it's best to avoid messing with tabindex manually if possible?)

@micahgodbolt
Copy link
Member

I've got it worked so that messagebar opens when focus is put into it, though if you close the message bar again the content is hidden again. Been messing with scrollTop without much success.
message-bar-expand

@msft-fluent-ui-bot
Copy link
Collaborator

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

@msft-fluent-ui-bot msft-fluent-ui-bot added the Resolution: Soft Close Soft closing inactive issues over a certain period label Feb 4, 2022
@microsoft microsoft locked as resolved and limited conversation to collaborators Mar 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants