Skip to content

Commit 87cb4c5

Browse files
committed
Added Aria labels to missing components
1 parent 8975826 commit 87cb4c5

5 files changed

Lines changed: 14 additions & 11 deletions

File tree

src/EventLogExpert/Shared/Components/Filters/AdvancedFilterRow.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
<span>
2020
@if (Value.IsExcluded)
2121
{
22-
<text>Exclude Expression: </text>
22+
<label for="@Id">Exclude Expression: </label>
2323
}
2424
else
2525
{
26-
<text>Expression: </text>
26+
<label for="@Id">Expression: </label>
2727
}
28-
<input class="input advanced-filter" @oninput="OnInputChanged"
28+
<input class="input advanced-filter" @oninput="OnInputChanged" id="@Id"
2929
placeholder="(Id == 1000 || Id == 1001) && Description.Contains('Fault')"
3030
type="text" value="@Value.Comparison.Value" />
3131
</span>

src/EventLogExpert/Shared/Components/Filters/AdvancedFilterRow.razor.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ namespace EventLogExpert.Shared.Components.Filters;
1111

1212
public sealed partial class AdvancedFilterRow
1313
{
14-
private Timer? _debounceTimer = null;
14+
private Timer? _debounceTimer;
1515
private string _errorMessage = string.Empty;
1616

17+
[Parameter] public string Id { get; set; } = Guid.NewGuid().ToString();
18+
1719
[Parameter] public FilterModel Value { get; set; } = null!;
1820

1921
[Inject] private IDispatcher Dispatcher { get; init; } = null!;
@@ -62,6 +64,5 @@ private void SaveFilter()
6264

6365
private void ToggleFilter() => Dispatcher.Dispatch(new FilterPaneAction.ToggleFilterEnabled(Value.Id));
6466

65-
private void ToggleFilterExclusion() =>
66-
Dispatcher.Dispatch(new FilterPaneAction.ToggleFilterExcluded(Value.Id));
67+
private void ToggleFilterExclusion() => Dispatcher.Dispatch(new FilterPaneAction.ToggleFilterExcluded(Value.Id));
6768
}

src/EventLogExpert/Shared/Components/Filters/FilterGroup.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="flex-space-between">
44
<div>@Group.DisplayName</div>
55

6-
<button class="button" type="button" @onclick="RenameGroup">
6+
<button aria-label="Rename @Group.DisplayName" class="button" type="button" @onclick="RenameGroup">
77
<i class="bi bi-pencil-square"></i>
88
</button>
99
</div>

src/EventLogExpert/Shared/Components/Filters/FilterGroupRow.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
<span>
2020
@if (Value.IsExcluded)
2121
{
22-
<text>Exclude Expression: </text>
22+
<label for="@Id">Exclude Expression: </label>
2323
}
2424
else
2525
{
26-
<text>Expression: </text>
26+
<label for="@Id">Expression: </label>
2727
}
28-
<input class="input advanced-filter" @oninput="OnInputChanged"
28+
<input class="input advanced-filter" @oninput="OnInputChanged" id="@Id"
2929
placeholder="(Id == 1000 || Id == 1001) && Description.Contains('Fault')"
3030
type="text" value="@Value.Comparison.Value" />
3131
</span>

src/EventLogExpert/Shared/Components/Filters/FilterGroupRow.razor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ namespace EventLogExpert.Shared.Components.Filters;
1111

1212
public sealed partial class FilterGroupRow
1313
{
14-
private Timer? _debounceTimer = null;
14+
private Timer? _debounceTimer;
1515
private string _errorMessage = string.Empty;
1616

17+
[Parameter] public string Id { get; set; } = Guid.NewGuid().ToString();
18+
1719
[Parameter] public FilterGroupId ParentId { get; set; }
1820

1921
[Parameter] public FilterModel Value { get; set; } = null!;

0 commit comments

Comments
 (0)