fix: NVDA says the section focus enters, a setting's explanation and each fog step

NVDA passes over a group that is not content as well as control, so titled
panels and the landmarks are now both. A setting's explanation and the note on
why the simulator ignores it are read after its name. The key under each setting
is no longer a silent stop for Tab, and a step of the fog slider moves the shown
distance.
This commit is contained in:
maj00r
2026-11-15 18:45:06 +01:00
parent d2b8cdf3ba
commit edd530cb4b
7 changed files with 86 additions and 6 deletions

View File

@@ -92,7 +92,7 @@ public class NamedGroupTests
Assert.Equal("Scenerie", AutomationProperties.GetName(panel));
Assert.Equal(AutomationControlType.Group, AutomationProperties.GetControlTypeOverride(panel));
Assert.True(AutomationProperties.GetIsControlElementOverride(panel));
Assert.Equal(AccessibilityView.Content, AutomationProperties.GetAccessibilityView(panel));
}
[Fact]
@@ -103,6 +103,7 @@ public class NamedGroupTests
Assert.Null(AutomationProperties.GetName(panel));
Assert.Null(AutomationProperties.GetControlTypeOverride(panel));
Assert.Equal(AccessibilityView.Default, AutomationProperties.GetAccessibilityView(panel));
}
[Fact]

View File

@@ -141,6 +141,34 @@ public class ScreenReaderNamesTests
Assert.Null(AutomationProperties.GetName(browse));
}
[Fact]
public void A_setting_row_describes_its_inputs_with_its_explanation()
{
var check = new CheckBox { Content = "Tryb pełnoekranowy" };
var slider = new Slider();
var row = new SettingRow { Label = "Ekran", Content = Row(check, slider) };
row.Description = "Gra zajmie cały ekran.";
row.IdleNote = "Ten symulator nie zna tego ustawienia.";
Assert.Equal("Gra zajmie cały ekran., Ten symulator nie zna tego ustawienia.", AutomationProperties.GetHelpText(check));
Assert.Equal(AutomationProperties.GetHelpText(check), AutomationProperties.GetHelpText(slider));
Assert.Null(AutomationProperties.GetName(check));
row.Description = null;
row.IdleNote = null;
Assert.Null(AutomationProperties.GetHelpText(check));
}
[Fact]
public void A_description_given_on_purpose_is_left_alone()
{
var box = new TextBox();
AutomationProperties.SetHelpText(box, "Ścieżka do exe");
_ = new SettingRow { Content = box, Description = "Plik symulatora" };
Assert.Equal("Ścieżka do exe", AutomationProperties.GetHelpText(box));
}
[Fact]
public void A_setting_row_without_a_label_leaves_its_input_unnamed()
{