Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ui/Features/Translate/TranslateSettingsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public TranslateSettingsWindow(TranslateSettingsViewModel vm)
TextWrapping = Avalonia.Media.TextWrapping.Wrap,
}.BindIsVisible(vm, nameof(vm.PromptIsVisible))
.BindText(vm, nameof(vm.PromptText));
promptTextBox.WithLabeledBy(labelPrompt);

var buttonOk = UiUtil.MakeButtonOk(vm.OkCommand);
var buttonCancel = UiUtil.MakeButtonCancel(vm.CancelCommand);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@

var searchBox = new TextBox
{
Watermark = Se.Language.Video.TextToSpeech.SearchVoices,

Check warning on line 219 in src/ui/Features/Video/TextToSpeech/VoiceManager/VoiceManagerWindow.cs

View workflow job for this annotation

GitHub Actions / test

'TextBox.Watermark' is obsolete: 'Use PlaceholderText instead.'

Check warning on line 219 in src/ui/Features/Video/TextToSpeech/VoiceManager/VoiceManagerWindow.cs

View workflow job for this annotation

GitHub Actions / test

'TextBox.Watermark' is obsolete: 'Use PlaceholderText instead.'
MinWidth = 180,
VerticalAlignment = VerticalAlignment.Center,
[!TextBox.TextProperty] = new Binding(nameof(vm.FilterText)) { Mode = BindingMode.TwoWay },
Expand Down Expand Up @@ -504,6 +504,7 @@
HorizontalAlignment = HorizontalAlignment.Stretch,
[!TextBox.TextProperty] = new Binding(nameof(vm.Transcript)) { Mode = BindingMode.TwoWay },
};
transcriptBox.WithLabeledBy(transcriptHeader);

var transcriptPanel = new StackPanel
{
Expand Down
6 changes: 4 additions & 2 deletions tests/UI/Logic/AccessibleNamesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
/// by the window or derived from its visible label by <see cref="AccessibleLabels"/>
/// (#12087: "I hear a value followed by combo box, but no label telling me which setting
/// I am changing"). This opens every tool window that takes a single DI-resolvable view
/// model and lists the inputs that still have no name.
/// model and lists the inputs that still have no name. Hidden inputs are included because
/// AccessibleLabels.Apply runs once when the window loads; controls that become visible later
/// do not get a second inference pass.
/// </summary>
public class AccessibleNamesTests
{
Expand Down Expand Up @@ -80,7 +82,7 @@
{
foreach (var control in window.GetLogicalDescendants().OfType<Control>())
{
if (!AccessibleLabels.IsInput(control) || control.TemplatedParent != null || !control.IsEffectivelyVisible)
if (!AccessibleLabels.IsInput(control) || control.TemplatedParent != null)
{
continue;
}
Expand Down Expand Up @@ -130,9 +132,9 @@
parts.Add($"name={control.Name}");
}

if (control is TextBox textBox && !string.IsNullOrEmpty(textBox.Watermark))

Check warning on line 135 in tests/UI/Logic/AccessibleNamesTests.cs

View workflow job for this annotation

GitHub Actions / test

'TextBox.Watermark' is obsolete: 'Use PlaceholderText instead.'
{
parts.Add($"watermark={textBox.Watermark}");

Check warning on line 137 in tests/UI/Logic/AccessibleNamesTests.cs

View workflow job for this annotation

GitHub Actions / test

'TextBox.Watermark' is obsolete: 'Use PlaceholderText instead.'
}

var parent = control.Parent;
Expand Down
Loading