Closed mrlacey closed 1 year ago
It's intentional that the close button isn't reachable with keyboard (same as Edge/Chrome).
@mrlacey Does Ctrl+F4 not work? @Stmoy what is the keyboard accessible expectation?
Does Ctrl+F4 not work?
Does Ctrl+F4 does nothing.
Ctrl+F4 should raise the TabCloseRequested event automatically. This sounds like a bug in TabView.
We also discussed the TabView raising TabCloseRequested on Ctrl+W, but decided that the app can handle that case if appropriate.
EDIT: Ctrl+F4 does the correct thing in the keyboarding sample in the Xaml Controls Gallery. @mrlacey - where is focus when you hit Ctrl+F4? Perhaps something else is eating that keyboard input?
I take it back. Ctrl+F4 does raise the right event. (My sample app had been modified so I didn't see it when I initially checked.)
The docs also say "mousewheel" should trigger the event too, but I don't see that.
Is there also a way to close a tab if using an Xbox game controller connected to a PC?
The docs also say "mousewheel" should trigger the event too, but I don't see that.
Interesting. This should also be automatically handled by the TabView control. It appears to work this way in the Gallery. Can you double check this one as well? By "mousewheel" we mean "middle click" (which is usually done by the mousewheel).
Is there also a way to close a tab if using an Xbox game controller connected to a PC?
Good catch. The expectation is that the app places a context menu/MenuFlyout on each tab with a "close tab" option.
Thinking out loud: we explicitly don't want to make the x-to-close button a TAB stop. However, maybe it should be gamepad-arrow focusable. Thoughts?
Thinking out loud: we explicitly don't want to make the x-to-close button a TAB stop. However, maybe it should be gamepad-arrow focusable. Thoughts?
Is that even possible?
I think just offering a default context menu seems best. That makes it more obvious for keyboard and gamepad users.
By "mousewheel" we mean "middle click" (which is usually done by the mousewheel).
Yes, I was middle-clicking with the mousewheel but it did not realize the cursor has to be over the tab and this doesn't work if the cursor is over the tab's content.
I think just offering a default context menu seems best. That makes it more obvious for keyboard and gamepad users.
A default content item would be a good solution. Also having the Ctrl+F4 shortcut documented somewhere a user might possibly find it would also be good. I expect to see it as a tool-tip on on the close button.
We're investigating what else we can/should do for the next rev of TabView. I've added this as an item in that list tracked in #1332.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Describe the bug It is not possible to close a
TabViewItem
using just the keyboard - likely ALLY issue.Steps to reproduce the bug
TabView
control.TabViewItem
s to theTabItems
collection.TabCloseRequested
event.Expected behavior The break point will never be hit! It should be possible to close a tab without having to use a pointing device. Without this it is not possible to provide a fully accessible experience using this control.
Screenshots button in question is highlighted in the screenshot below
Version Info
NuGet package version: Microsoft.UI.Xaml 2.2.190917002
Additional context This issue was discovered as part of investigation into https://github.com/microsoft/WindowsTemplateStudio/issues/3407