mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-27 17:09:37 +01:00
fix: NVDA reads the tree entry, slider and help button under the mouse
The tree entry listed the entries under it as its own children, so the controls inside it lost their way up and Windows failed every lookup there. It now only points up to the entry it hangs under, which is all the level needs. The buttons and knob of a slider's track had no name; they now say the slider's name and value. A button showing only a sign such as "?" takes its tooltip.
This commit is contained in:
@@ -158,8 +158,11 @@ public static class ScreenReaderNames
|
||||
AutomationProperties.SetAccessibilityView(panel, name is null ? AccessibilityView.Default : AccessibilityView.Content);
|
||||
}
|
||||
|
||||
// A sign such as "?" says nothing read aloud; its tooltip says what it does.
|
||||
private static void NameButton(Button button) =>
|
||||
Give(button, button.Content is string ? null : TextOf(ToolTip.GetTip(button)) ?? TextOf(button.Content));
|
||||
Give(button, button.Content is string text && text.Any(char.IsLetterOrDigit)
|
||||
? null
|
||||
: TextOf(ToolTip.GetTip(button)) ?? TextOf(button.Content));
|
||||
|
||||
// The descriptions given here, so a later one replaces it but nothing else.
|
||||
private static readonly ConditionalWeakTable<StyledElement, string> Described = new();
|
||||
|
||||
Reference in New Issue
Block a user