-
Notifications
You must be signed in to change notification settings - Fork 964
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
DateTimePicker has incorrect AccessKey and KeyboardShortcut accessibility properties when Text contains '&' character #9281
Labels
good first issue
Issue should be easy to implement, good for first-time contributors
tenet-accessibility
MAS violation, UIA issue; problems with accessibility standards
Comments
dmitrii-drobotov
added
untriaged
The team needs to look at this issue in the next triage
tenet-accessibility
MAS violation, UIA issue; problems with accessibility standards
labels
Jun 13, 2023
merriemcgaw
removed
the
untriaged
The team needs to look at this issue in the next triage
label
Jun 21, 2023
Most likely real world DateTimePickers don't have Text property set because this property is hidden from the designer. Thus this seems to be a low pri issue. |
Tanya-Solyanik
added
the
good first issue
Issue should be easy to implement, good for first-time contributors
label
Jun 27, 2023
Epica3055
added a commit
to Epica3055/winforms
that referenced
this issue
Jul 3, 2023
…sibility properties when Text contains '&' character dotnet#9281
Epica3055
added a commit
to Epica3055/winforms
that referenced
this issue
Jul 3, 2023
…sibility properties when Text contains '&' character dotnet#9281
ghost
removed this from the .NET 8.0 milestone
Jul 5, 2023
Verified this issue on .NET 8.0.100-preview.7.23376.3 test pass build, it was fixed, test result is same as above. |
ghost
locked as resolved and limited conversation to collaborators
Aug 30, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
good first issue
Issue should be easy to implement, good for first-time contributors
tenet-accessibility
MAS violation, UIA issue; problems with accessibility standards
.NET version
.NET 8
Did it work in .NET Framework?
No
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No
Issue description
Follow-up on https://github.com/dotnet/winforms/pull/9253/files#r1227133642.
When DateTimePicker has text with '&' character before another character, DateTimePickerAccessibleObject interprets it as a mnemonic character — as if it's a shortcut to select it by Alt+mnemonic. Some controls like Label support it by adding an underscore for a mnemonic character and making it a shortcut. But DateTimePicker doesn't seem to support it, '&' is interpreted as a regular character without any special meaning, it doesn't create a shortcut. I didn't find a way to turn '&' into a mnemonic by escaping it with
\
or similar, and there is no documentation on Win32 DateTimePicker regarding mnemonic characters.As a result, Narrator announces it as a shortcut, although it doesn't work, unlike a mnemonic shortcut from Label with
"&Date"
text:AccessKey and KeyboardShortcut accessibility properties should be empty instead of "Alt+t":
Steps to reproduce
Format
asCustom
&
before any character inCustomFormat
property, for example setCustomFormat
as'Date&Time' hh:mm dd/MM
Sample app:
WinFormsApp8.zip
The text was updated successfully, but these errors were encountered: