-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Proposal] Allow focus on disabled controls #7749
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
Comments
Can you tell us the reason WHY they need accessing disabling controls? The reason to disable a control is to prevent end user doing anything with it. It allows to skip controls using the keyboard navigation. This is often a wanted behavior on form pages. So quite the opposite of what you want. I'm aware you want an optional flag and not a breaking change, still I am trying to explain WHY focus is blocked. A question you've asked. Now you would need to explain WHY focus shouldn't be blocked. Whats the benefit? And why is making a control readonly for example not a suitable solution for such a special use case? |
I am not categorically against exploring this idea from technical point of view but I would like to hear from people with disabilities that this is actually an issue or that the proposed solution would be an improvement. And if this was the case, then perhaps this should go even higher than WPF - Windows, or have an accessibility standard updated. There is enough of people with disabilities that we don't need to be basing these decisions on "IMHO". With that said, I am afraid this would be a bit more complex task than you suggest, it's not only about enabling focus on disabled controls, it is retemplating everything for this state. You would suddenly have a new state possible (disabled+focused) and then 3rd party controls might not get updated and then it will be a mess on a window... |
Yes, IsReadOnly could be used for some controls, but only for some. And yes, i am totally aware that some screen readers have a mode that allows you to traverse the automation tree, but that has to be turned on explicitly and you have to know that there is something you can't reach.
I guess that ship has already sailed, as, and that might catch you by surprise (as it did for me), newer Office versions allow focus on disabled controls.
It would require work, but not for everything, not for everyone and not all of a sudden, but only if the developer decides to enable the feature for certain things. That's still way better than completely blocking the focus at the framework level. |
You wrote "keyboard navigation". How is a blind person supposed to know a control exist only by keyboard navigating to it? I thought they use screen readers. Do screen readers skip disabled controls (honest question, I never used them)? And what do screen readers do when they read out a disabled control, do they mention its disabled? Whats the benefit of a (blind) person knowing something exist but this person cannot use it? We're speaking about an edge case scenario already. I am just trying to find out how edge case it really is. It sounds like that if it is really needed, it can be workaround somehow. For example by enabling a mode for handicapped people which shows a textblock next to these controls which can be read by screen readers. You said it yourself, you want an opt in. Which means the developers must know they have users like that and they must be willing to support them. Even if this isn't the ideal solution where it only takes flipping a switch, it could still be a solution. |
I assumed you knew how screen readers work, sorry. Screen readers mostly, not only but most of the time, work by tracking the focus. If something can't receive focus it's "invisible" for the user (if the user is completely blind). So to discover what the current screen contains the user tabs through the UI.
Well that's the way it is. They have to tab through. What should the alternative be?
Yes they do. If they didn't skip them, we wouldn't have this conversation. ;-)
Disabled state is announced by the screen reader.
It can be read to them. And they know it exists. For example a button that is disabled still can provide information on the reason why it's disabled like "Save is not available as you don't have the required permissions."
Uh.
That requires much more work when developing the application as you have to take it into account in your whole layout and duplicate everything as a TextBlock. IMHO it feels quite strange to me that you admit to have zero knowledge about screen readers and accessibility and yet oppose a proposal to ease development for increased accessibility, by arguing that it's just an edge case. |
I never opposed this proposal. I only asked questions. It is a fact that its an edge case scenario when we talk about handicapped people because they are a minority, its not an argument. And that you mention its quite expensive and requires a lot of additional work just underlines the statement. It is only you who put "edge case scenario" on the same level as "not important", I never said that and I never meant that. I am just trying to understand why you want something that sounds like it can be workaround. Because then I and others can understand if there is really a problem and how important this problem actually is. If there isn't a workaround, it is a problem and a huge one. If it can be workaround with a moderate amount of work, it is a problem but a small one and so on. This is important because there are A LOT of other important things, A LOT developers are waiting for already. Things where they cannot use workarounds. |
So your point is NOTHING should be fixed/improved as long as there is a workaround? |
I have not said anything like that. Actually I said quite the opposite of it, for example in the following line:
When its a problem it must be fixed, I thought that this logical step doesn't have to mentioned. But problems here on github are categorized based on their priority, common standard. And issues where workaround exists have lower priority (which I meant with small problem) than issues which don't have workarounds, also a common standard. There are of course also other factors which effects the priority. Which I only mention before there is another misinterpretation of my lines by trying to read things out I haven't said. |
@batzen I agree with your point of view, because I think focusable and control's disable state can be two independent states. |
Just to add my perspective to this, as I do not see it as an edge case: We need to make the controls accessible for keyboard focus, even when they are disabled, otherwise the mental map of the application changes every time a CanExecute is switched. Imagine working in a program where every time you make a new selection, buttons 'randomly' appear/disappear, it makes creating a mental map of related actions almost impossible. The guiding principle for accessibility development is that all users should have the same options regardless of what interaction scheme they are using. The main problem right now is that the pattern for developing accessible applications is to utilize the AutomationPeer framework. So any solution that requires us to replace one control for another, to provide a focus point for the screen reader to interact with, will be an Anti Pattern where an inappropriate peer will be returned. As to the question of styling, currently the way Office is handling it, is having it match the 'Disabled' style with the FocusVisualStyle shown. Finally, since this is now a feature of the Office package and the Windows explorer, it is what users will be expecting from all other products on the Windows client, thus we need to make it as available to developers as possible. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I hid my last two comments as HypsyNZ decided to delete his comments, thus making mine "outdated". |
If
Of course not. |
It makes controls focusable that have With proposed changes: The meaning of neither |
@karelz Any news about this? |
@batzen - This is currently not in consideration for .NET 10. |
@pchaurasia14 does that mean it's generally considered and there is hope to get this into, .NET 11, for example? |
@batzen - Too early to tell. We'll let you know if this can make it .NET 11. |
I don't have much more to add than what I initially wrote, but I still believe this would be a huge benefit for users with accessibility needs. Combining that with the fact that the office package is for most clients the 'de facto' standard for what is possible/expected I see this as a high priority issue. |
Problem
I always wondered, and was recently remembered by it again in fluentribbon/Fluent.Ribbon#1121 by @cbra-caa, why focus on disabled controls is completely blocked.
IMHO this reduces accessibility as people with disabilities are completely blocked from accessing disabled controls using the keyboard.
Proposal
I propose that we, optionally, allow focus on disabled controls.
That way application developers could add accessibility options to their applications to allow focus on disabled controls.
Implementation
To implement this we could add a new property like
FocusableWhenNotEnabled
which would unblock focus on disabled controls.I will give this a try and create a PR in the near future to explore which areas of WPF would have to be modified to make this possible.
If anyone has suggestions, concerns or any other kind of feedback regarding this i would be happy to hear from you.
The text was updated successfully, but these errors were encountered: