-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Accesibility: spaces] Switching to another space should show a notification #36746
Conversation
💔 Build Failed |
Pinging @elastic/kibana-security |
x-pack/plugins/spaces/public/views/nav_control/components/spaces_menu.tsx
Outdated
Show resolved
Hide resolved
onClose: () => this.props.spacesManager.changeSelectedSpace(space), | ||
}); | ||
|
||
setTimeout(() => this.props.spacesManager.changeSelectedSpace(space), 4000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching between spaces today already takes a decent amount of time because of the full page reload that's required, and the fact that we place users on the Kibana home screen following a space switch. So it likely takes users at least 10 seconds to switch spaces and navigate to the application they're interested in.
I feel that adding an additional 4 seconds before any of that happens would unnecessarily frustrate a large number of users. Now that the space selector menu has a descriptive aria-label ("Switch to {spaceName} space"), do we need this additional notification? We don't do this dual-notification when switching between applications, for example.
IF we do need this notification, then the toast is rather hard to discover. This is perhaps more of a question for the design team, but switching a space happens in the top left of the screen, but the notification appears in the bottom right of the screen:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@legrego this is not going to be visible in the future, however, making toast notifications able to hidden but announced is another PR: elastic/eui#2055
Delay you mentioned is crucial indeed.
I think you are right that we have already aria-label before hit switching, so the main deal here is to confirm for a user that switching process is starting.
Would it be enough to announce "Switching..." and reload the page? What do you think?
x-pack/plugins/spaces/public/views/nav_control/nav_control_popover.tsx
Outdated
Show resolved
Hide resolved
💔 Build Failed |
💔 Build Failed |
retest |
💔 Build Failed |
retest |
💔 Build Failed |
Sorry for the delay, I'm not on my normal duties this week, so my time has been rather limited.
It looks like the EUI upgrade which includes elastic/eui#2055 is in progress here: #39601. Once that merges, can we update this PR to use the hidden toasts, rather than following this up with another PR to fix the behavior?
I agree it'd be enough to simply announce "switching", or maybe "switching space". What do you think is the absolute minimum of a delay we can introduce? I'd like for this to not impact users who do not need a screen reader. Since this process requires a call to
Since we're introducing a delay, I think it'd make sense to give a visual indication in the space selector itself that the operation is in progress. Maybe a spinner of some sort, but I'll defer to @elastic/kibana-design on that. On resource constrained installations, there is already a perceivable delay when switching spaces, so I worry if we make that worse that users will think that Kibana isn't responding to them. |
Yes, we can. Let's do so. |
Not exactly as it looks. That PR 2055 is about another issue, so now it needs to add hidden toasts in EUI and then come here up to update this PR. |
I have to admit that I was not right. The main issue here is that we should make a user sure that they are getting switched to the chosen space. Thus we should announce the space name. Thus the shortest option is "Switching to {name} name." |
💔 Build Failed |
I think this is the part that I'm having a hard time understanding. When users switch between applications in Kibana, we don't have to announce that in any special way. We just let the click the link and off they go. Switching applications has the potential to be as much of a context switch as changing spaces, so I don't quite understand why spaces needs all of this special treatment. If the window title were updated to include the current space name, would that provide enough context, or is the title not always announced on page reloads? |
These are good questions, I'm not sure about the most correct solution here. |
I do think this PR helps the situation but I think we can accomplish more in other ways without having to rely on artificial delays and visually hidden toasts. Ultimately, with all of the other improvements that can be made, I don't think any sort of custom notification is required for this. I was going to try to enumerate* all of the bugs and improvements that can be made but it became difficult because, I believe, the component powering the dropdown and the items within is inherently the wrong abstraction and has poor semantics for this case. There's currently a draft of an upcoming "disclosure pattern" for dropdown navigation which I think is a much better fit for this component. Building on top of that, with maybe a couple more descriptive elements, I think we can achieve everything we've set out to do. If it'd be helpful I can relatively quickly build a demo of what the final experience could be like in codepen. * Ok, I will try enumerate the issues after all for the sake of education and discussion:
|
Apologies for not getting back to this sooner.
There was a note that
Now with all that being said, one would think that any link which opens a new page should alert the user to a change in context. However in navigating through sites like WebAim, I don't see any link that goes to a new page reporting a change in context. I think that most web users understand that a link will take you someplace else (the exceptions are when a link opens a new window/tab which would change the users back/forward navigation ability).
I agree, and have always had that preference as well. But that's more of a design choice than a WCAG issue, and so long as it's consistent throughout the entire application it should not be an issue.
The aria-haspopup indicates the availability of a menu or dialog, and possibly rather than simply having a value of "true" perhaps it should have a value of "listbox" or "menu" (
Correct, this is the entire point behind 3.2.3 Consistent Navigation - Level AA |
Related: #23885
Summary
Here I did two things:
Then: clicking the switch space trigger immediate page reload.
Now: it shows a notification, waits 4s for reloading the page.
This is one of the 3 steps to improve that behaviour:
Additional steps
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] Unit or functional tests were updated or added to match the most common scenarios[ ] This was checked for keyboard-only and screenreader accessibility