From 014eaffcdac6979b8916cef07880071e750e3f95 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Wed, 3 Jul 2024 12:24:40 +0200 Subject: [PATCH 1/3] Add aria-selected to FluentOption --- .../Demo/Shared/Pages/Lab/IssueTester.razor | 35 +++++++++++++++++++ src/Core/Components/List/FluentOption.razor | 3 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/examples/Demo/Shared/Pages/Lab/IssueTester.razor b/examples/Demo/Shared/Pages/Lab/IssueTester.razor index 0e8d03c85c..9ec479d18f 100644 --- a/examples/Demo/Shared/Pages/Lab/IssueTester.razor +++ b/examples/Demo/Shared/Pages/Lab/IssueTester.razor @@ -1 +1,36 @@ @page "/issue-tester" + + +

Selected options: @String.Join(", ", SelectedStrings)

+ + + + +@code { + IEnumerable PossibleStrings { get; set; } = new List() + { + "Test 1", + "Test 2", + "Test 3", + "Test 4" + }; + + IEnumerable? SelectedStrings { get; set; } = []; + + void ToggleSelectAll(bool isChecked) + { + if (isChecked) + { + SelectedStrings = PossibleStrings; + } + else + { + SelectedStrings = []; + + } + } +} diff --git a/src/Core/Components/List/FluentOption.razor b/src/Core/Components/List/FluentOption.razor index f3b8323c34..31247caf51 100644 --- a/src/Core/Components/List/FluentOption.razor +++ b/src/Core/Components/List/FluentOption.razor @@ -1,4 +1,4 @@ -@namespace Microsoft.FluentUI.AspNetCore.Components +@namespace Microsoft.FluentUI.AspNetCore.Components @inherits FluentComponentBase @typeparam TOption @ChildContent From a2601c2dac99c7fbcb9748032c006ca33bd225a3 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Wed, 3 Jul 2024 12:46:27 +0200 Subject: [PATCH 2/3] Update Unit Test verified files --- ...Tests.FluentCombobox_ClearSelection.verified.html | 2 +- ...s.FluentListbox_NameAttribute.verified.razor.html | 6 +++--- ....FluentListbox_OptionTemplate.verified.razor.html | 6 +++--- ...ests.FluentListbox_OptionText.verified.razor.html | 6 +++--- ...sts.FluentListbox_OptionValue.verified.razor.html | 6 +++--- ...boxTests.FluentListbox_Simple.verified.razor.html | 6 +++--- ...Tests.FluentListbox_WithIcons.verified.razor.html | 6 +++--- ...luentSelect_Appearance-Accent.verified.razor.html | 10 +++++----- ...luentSelect_Appearance-Filled.verified.razor.html | 10 +++++----- ...uentSelect_Appearance-Stealth.verified.razor.html | 10 +++++----- ....FluentSelect_CustomIndicator.verified.razor.html | 12 ++++++------ ...ts.FluentSelect_NameAttribute.verified.razor.html | 6 +++--- ...s.FluentSelect_OptionTemplate.verified.razor.html | 10 +++++----- ...Tests.FluentSelect_OptionText.verified.razor.html | 10 +++++----- ...ests.FluentSelect_OptionValue.verified.razor.html | 10 +++++----- ...ests.FluentSelect_Placeholder.verified.razor.html | 10 +++++----- ...ts.FluentSelect_PositionAbove.verified.razor.html | 8 ++++---- ...ts.FluentSelect_PositionBelow.verified.razor.html | 8 ++++---- ...lectTests.FluentSelect_Simple.verified.razor.html | 6 +++--- ...tTests.FluentSelect_WithIcons.verified.razor.html | 10 +++++----- 20 files changed, 79 insertions(+), 79 deletions(-) diff --git a/tests/Core/List/FluentComboboxTests.FluentCombobox_ClearSelection.verified.html b/tests/Core/List/FluentComboboxTests.FluentCombobox_ClearSelection.verified.html index 28af553a08..8e8705d6d7 100644 --- a/tests/Core/List/FluentComboboxTests.FluentCombobox_ClearSelection.verified.html +++ b/tests/Core/List/FluentComboboxTests.FluentCombobox_ClearSelection.verified.html @@ -1,5 +1,5 @@ - Contoso + Contoso \ No newline at end of file diff --git a/tests/Core/List/FluentListboxTests.FluentListbox_NameAttribute.verified.razor.html b/tests/Core/List/FluentListboxTests.FluentListbox_NameAttribute.verified.razor.html index fdd8f8de4f..013e4b16ba 100644 --- a/tests/Core/List/FluentListboxTests.FluentListbox_NameAttribute.verified.razor.html +++ b/tests/Core/List/FluentListboxTests.FluentListbox_NameAttribute.verified.razor.html @@ -1,8 +1,8 @@
- 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates
\ No newline at end of file diff --git a/tests/Core/List/FluentListboxTests.FluentListbox_OptionTemplate.verified.razor.html b/tests/Core/List/FluentListboxTests.FluentListbox_OptionTemplate.verified.razor.html index 347e9e7a2e..cf4a9a533e 100644 --- a/tests/Core/List/FluentListboxTests.FluentListbox_OptionTemplate.verified.razor.html +++ b/tests/Core/List/FluentListboxTests.FluentListbox_OptionTemplate.verified.razor.html @@ -1,21 +1,21 @@
- +
Denis Voituron
- +
Vincent Baaij
- +
diff --git a/tests/Core/List/FluentListboxTests.FluentListbox_OptionText.verified.razor.html b/tests/Core/List/FluentListboxTests.FluentListbox_OptionText.verified.razor.html index 876e082fd6..e9a17f35ab 100644 --- a/tests/Core/List/FluentListboxTests.FluentListbox_OptionText.verified.razor.html +++ b/tests/Core/List/FluentListboxTests.FluentListbox_OptionText.verified.razor.html @@ -1,8 +1,8 @@
- Denis Voituron (1) - Vincent Baaij (2) - Bill Gates (3) + Denis Voituron (1) + Vincent Baaij (2) + Bill Gates (3)
\ No newline at end of file diff --git a/tests/Core/List/FluentListboxTests.FluentListbox_OptionValue.verified.razor.html b/tests/Core/List/FluentListboxTests.FluentListbox_OptionValue.verified.razor.html index d56030129a..c40fa90e29 100644 --- a/tests/Core/List/FluentListboxTests.FluentListbox_OptionValue.verified.razor.html +++ b/tests/Core/List/FluentListboxTests.FluentListbox_OptionValue.verified.razor.html @@ -1,8 +1,8 @@
- 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates
\ No newline at end of file diff --git a/tests/Core/List/FluentListboxTests.FluentListbox_Simple.verified.razor.html b/tests/Core/List/FluentListboxTests.FluentListbox_Simple.verified.razor.html index d695af99b8..a85555cf3f 100644 --- a/tests/Core/List/FluentListboxTests.FluentListbox_Simple.verified.razor.html +++ b/tests/Core/List/FluentListboxTests.FluentListbox_Simple.verified.razor.html @@ -1,8 +1,8 @@
- 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates
\ No newline at end of file diff --git a/tests/Core/List/FluentListboxTests.FluentListbox_WithIcons.verified.razor.html b/tests/Core/List/FluentListboxTests.FluentListbox_WithIcons.verified.razor.html index 97f5b4fe20..ae4c652ede 100644 --- a/tests/Core/List/FluentListboxTests.FluentListbox_WithIcons.verified.razor.html +++ b/tests/Core/List/FluentListboxTests.FluentListbox_WithIcons.verified.razor.html @@ -1,7 +1,7 @@
- + Search
@@ -9,7 +9,7 @@
- + Show
@@ -17,7 +17,7 @@
- + Generate
diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Accent.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Accent.verified.razor.html index bd2192c13e..1afb0629a0 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Accent.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Accent.verified.razor.html @@ -1,11 +1,11 @@ - 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Filled.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Filled.verified.razor.html index 67816aa51a..2cf9c85f90 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Filled.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Filled.verified.razor.html @@ -1,11 +1,11 @@ - 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Stealth.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Stealth.verified.razor.html index b0b6e82f97..9c0fdee415 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Stealth.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_Appearance-Stealth.verified.razor.html @@ -1,11 +1,11 @@ - 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_CustomIndicator.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_CustomIndicator.verified.razor.html index c787f29575..b79dd5297e 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_CustomIndicator.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_CustomIndicator.verified.razor.html @@ -1,7 +1,7 @@ @@ -10,8 +10,8 @@
- Option One - Option Two - Option Three - Option Four + Option One + Option Two + Option Three + Option Four \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_NameAttribute.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_NameAttribute.verified.razor.html index b3182b9bfb..9ef6d8d38e 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_NameAttribute.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_NameAttribute.verified.razor.html @@ -5,7 +5,7 @@ - 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_OptionTemplate.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_OptionTemplate.verified.razor.html index cb152a43e9..9328fd402e 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_OptionTemplate.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_OptionTemplate.verified.razor.html @@ -1,25 +1,25 @@ - +
Denis Voituron
- +
Vincent Baaij
- +
diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_OptionText.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_OptionText.verified.razor.html index 567be7e8e9..ec11be7693 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_OptionText.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_OptionText.verified.razor.html @@ -1,11 +1,11 @@ - Denis Voituron (1) - Vincent Baaij (2) - Bill Gates (3) + Denis Voituron (1) + Vincent Baaij (2) + Bill Gates (3) \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_OptionValue.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_OptionValue.verified.razor.html index 162d1fb877..988e23001d 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_OptionValue.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_OptionValue.verified.razor.html @@ -1,11 +1,11 @@ - 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_Placeholder.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_Placeholder.verified.razor.html index 0c5bbb57fe..c1e7e58644 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_Placeholder.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_Placeholder.verified.razor.html @@ -5,8 +5,8 @@ - - 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates - + + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates + \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_PositionAbove.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_PositionAbove.verified.razor.html index 60131f4e2a..4e7df8e359 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_PositionAbove.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_PositionAbove.verified.razor.html @@ -1,10 +1,10 @@ - Position forced above - Option Two + Position forced above + Option Two \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_PositionBelow.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_PositionBelow.verified.razor.html index 9b55cb576c..2addbf5239 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_PositionBelow.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_PositionBelow.verified.razor.html @@ -1,10 +1,10 @@ - Position forced above - Option Two + Position forced above + Option Two \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_Simple.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_Simple.verified.razor.html index c79cce0440..bb9b8108d8 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_Simple.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_Simple.verified.razor.html @@ -5,7 +5,7 @@ - 1-Denis Voituron - 2-Vincent Baaij - 3-Bill Gates + 1-Denis Voituron + 2-Vincent Baaij + 3-Bill Gates \ No newline at end of file diff --git a/tests/Core/List/FluentSelectTests.FluentSelect_WithIcons.verified.razor.html b/tests/Core/List/FluentSelectTests.FluentSelect_WithIcons.verified.razor.html index 83bcd556b2..0d762d554e 100644 --- a/tests/Core/List/FluentSelectTests.FluentSelect_WithIcons.verified.razor.html +++ b/tests/Core/List/FluentSelectTests.FluentSelect_WithIcons.verified.razor.html @@ -1,11 +1,11 @@ - + Search
@@ -13,7 +13,7 @@
- + Show
@@ -21,7 +21,7 @@
- + Generate
From 16b772451fbd17bdb146e69a2a0e2aad2acc0ab6 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Wed, 3 Jul 2024 14:51:20 +0200 Subject: [PATCH 3/3] - Clear IssueTester - Update WhatsNew --- WHATSNEW.md | 1 + .../Demo/Shared/Pages/Lab/IssueTester.razor | 35 ------------------- examples/Demo/Shared/wwwroot/docs/WhatsNew.md | 1 + 3 files changed, 2 insertions(+), 35 deletions(-) diff --git a/WHATSNEW.md b/WHATSNEW.md index 86977ac2fb..56680ba31e 100644 --- a/WHATSNEW.md +++ b/WHATSNEW.md @@ -28,6 +28,7 @@ - [Dialog] Fix failing tests ([#2283](https://github.com/microsoft/fluentui-blazor/pull/2283)) - [DialogService] Fix UpdateDialogAsync to refresh parameters and content ([#2310](https://github.com/microsoft/fluentui-blazor/pull/2310)) - [Lists] Pass `Name` parameter ([#2305](https://github.com/microsoft/fluentui-blazor/pull/2305)) +- [Lists] Add aria-selected to fluent-option ([#2316](https://github.com/microsoft/fluentui-blazor/pull/2316)) - [Multisplitter] Fix width panels ([#2218](https://github.com/microsoft/fluentui-blazor/pull/2218)) - [MultiSplitter] Prevent semicolons from being displayed. ([#2226](https://github.com/microsoft/fluentui-blazor/pull/2226)) - [NavMenu] Revert fix for when prerender set to false ([#2293](https://github.com/microsoft/fluentui-blazor/pull/2293)) diff --git a/examples/Demo/Shared/Pages/Lab/IssueTester.razor b/examples/Demo/Shared/Pages/Lab/IssueTester.razor index 9ec479d18f..0e8d03c85c 100644 --- a/examples/Demo/Shared/Pages/Lab/IssueTester.razor +++ b/examples/Demo/Shared/Pages/Lab/IssueTester.razor @@ -1,36 +1 @@ @page "/issue-tester" - - -

Selected options: @String.Join(", ", SelectedStrings)

- - - - -@code { - IEnumerable PossibleStrings { get; set; } = new List() - { - "Test 1", - "Test 2", - "Test 3", - "Test 4" - }; - - IEnumerable? SelectedStrings { get; set; } = []; - - void ToggleSelectAll(bool isChecked) - { - if (isChecked) - { - SelectedStrings = PossibleStrings; - } - else - { - SelectedStrings = []; - - } - } -} diff --git a/examples/Demo/Shared/wwwroot/docs/WhatsNew.md b/examples/Demo/Shared/wwwroot/docs/WhatsNew.md index 410c9f0b2e..ed7d32dafd 100644 --- a/examples/Demo/Shared/wwwroot/docs/WhatsNew.md +++ b/examples/Demo/Shared/wwwroot/docs/WhatsNew.md @@ -28,6 +28,7 @@ - [Dialog] Fix failing tests ([#2283](https://github.com/microsoft/fluentui-blazor/pull/2283)) - [DialogService] Fix UpdateDialogAsync to refresh parameters and content ([#2310](https://github.com/microsoft/fluentui-blazor/pull/2310)) - [Lists] Pass `Name` parameter ([#2305](https://github.com/microsoft/fluentui-blazor/pull/2305)) +- [Lists] Add aria-selected to fluent-option ([#2316](https://github.com/microsoft/fluentui-blazor/pull/2316)) - [Multisplitter] Fix width panels ([#2218](https://github.com/microsoft/fluentui-blazor/pull/2218)) - [MultiSplitter] Prevent semicolons from being displayed. ([#2226](https://github.com/microsoft/fluentui-blazor/pull/2226)) - [NavMenu] Revert fix for when prerender set to false ([#2293](https://github.com/microsoft/fluentui-blazor/pull/2293))