Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous Acessibility Fixes #1326

Merged
merged 19 commits into from
Aug 16, 2023
Merged

Miscellaneous Acessibility Fixes #1326

merged 19 commits into from
Aug 16, 2023

Conversation

karkarl
Copy link
Collaborator

@karkarl karkarl commented Aug 9, 2023

Description

This PR includes a handful of accessibility bug fixes.

  • Bug 44665966: [WinUI Accessibility: Design guidance -> Accessibility -> Color contrast ]: No proper label name is defined to the split buttons present under Color Contrast Checker group.
    - InlineColorPicker UserControl is updated to be compliant

  • Bug 44672713: [WinUI Accessibility: Design guidance -> Accessibility -> Color contrast ]: Text color, Background color and Contrast ratio text present under Color Contrast Checker group is not visible in high contrast Aquatic and Desert themes.
    - Background is updated to the correct brush

  • Bug 44661719: [WinUI Accessibility: Design guidance -> Colors]: No success information upon invoking any of the banner items. Bug 44661675: [WinUI Accessibility: Design guidance -> Colors]: Control type is not defined to the Top banner items i.e., Text, Fill, Stroke, Background and Signal.
    - Segmented from community toolkit lacks AP
    - implementation, and is replaced with ComboBox. As Segmented is still an "experimental" control, I would like to go through the design team to make sure it is used correctly.

  • Bug 44661749: [WinUI Accessibility: Design guidance -> Colors]: Unable to navigate and access 'Copy brush name' button using keyboard.
    - Copy button is made consistently visible.

  • Bug 44661258: [WinUI Accessibility: Home]: Keyboard focus is getting reset on invoking ‘Scroll right’ button.
    - Manual focus is added in codebehind after invocation.

  • Bug 44964995: [WinUI Accessibility]: Screen reader is not announcing the success message after invoking 'Reset sample' button present in 'Breadcrumbbar' card.
    - AnnounceActionForAccessibility is added to manually announce success notification.

  • Bug 43942055: [WinUI Gallery] WinUI Accessibility: AppBarButton: Screen reader stays mute after activating the 'Symbol Icon/Bitmap Icon/Font Icon/Path Icon/Save' buttons.
    - AnnounceActionForAccessibility is added to manually announce success notification.

  • Bug 43944726: [WinUI Gallery] WinUI Accessibility: IconElement: Name property is not defined for the buttons present in 'Icon Element' page.
    - x: namespace is added to Name property.

  • Bug 43944253: [WinUI Gallery] WinUI Accessibility: SplitButton: Name property is not defined for the list items present in 'Font Colour' Split button.
    - Add AutomationProperties.Name

  • Bug 44964941: [WinUI Gallery] WinUI Accessibility: When user invokes 'toggle theme' button, screen reader stays mute and fails announcing about the action performed.
    - AnnounceActionForAccessibility is added to manually announce success notification.

  • Bug 44572299: ESC key should not navigate pages back
    - Remove OnKeyDown method related to esc key.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

WinUIGallery/WinUIGallery.csproj Outdated Show resolved Hide resolved
WinUIGallery/ControlPages/BreadcrumbBarPage.xaml Outdated Show resolved Hide resolved
x:Name="BackgroundColorPicker"
Grid.Row="1"
AutomationProperties.Name="BackgroundColorPicker"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the UIA name be a bit more descriptive here and on the other picker?

Copy link
Collaborator Author

@karkarl karkarl Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was descriptive haha. All ears for ideas. :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the UIA name should be something that you just have as the text to replace the button with, i.e. it also is semantically fitting. So in this case maybe something like "Pick Background color", given that the elements inside it already have the appropriate names, do we even need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AutomationProperties.Name is set so that the accessibility visual tree also has a name set. I guess technically InlineColorPicker can also "propagate" the name property instead like Button.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, I think this is good as is.

@@ -64,6 +64,7 @@ private void OnCopyLinkButtonClick(object sender, RoutedEventArgs e)
public void OnThemeButtonClick(object sender, RoutedEventArgs e)
{
ToggleThemeAction?.Invoke();
UIHelper.AnnounceActionForAccessibility(ThemeButton, "Theme Changed.", "ThemeChangedSuccessNotificationId");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: spelling

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did I spell wrong...? Is it the Capital C?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes though users of the app will not notice this

Copy link
Collaborator

@marcelwgn marcelwgn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@karkarl karkarl merged commit 3a9999b into main Aug 16, 2023
1 check passed
marcelwgn added a commit to marcelwgn/WinUI-Gallery that referenced this pull request Aug 28, 2023
commit 5ab6b6f
Merge: 91818c9 d7c780b
Author: Karen <7976322+karkarl@users.noreply.github.com>
Date:   Mon Aug 28 08:57:28 2023 -0700

    Merge pull request microsoft#1335 from chingucoding/dev/fix-build-errors

    Fix build errors and CI

commit d7c780b
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Sun Aug 27 18:44:27 2023 +0200

    Empty commit to trigger CI

commit 7f5b455
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Sun Aug 27 18:29:37 2023 +0200

    Empty commit to trigger CI

commit 51efdcf
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Sun Aug 27 18:04:24 2023 +0200

    Trim and parameterize publishing WinUI Gallery

commit b5e7c6b
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Fri Aug 25 22:38:33 2023 +0200

    Revert "Use different winappdriver port"

    This reverts commit 17858fa.

commit 9bb3080
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Fri Aug 25 22:38:03 2023 +0200

    Work around WinAppDriver/Appium issue

commit 17858fa
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Fri Aug 25 21:38:45 2023 +0200

    Use different winappdriver port

commit 62c33a4
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Fri Aug 25 21:15:06 2023 +0200

    Update axe helper to find app correctly

commit 909f724
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Fri Aug 25 21:13:04 2023 +0200

    Revert "Update package ID reference"

    This reverts commit 4c8b98f.

commit 4c8b98f
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Fri Aug 25 20:55:49 2023 +0200

    Update package ID reference

commit bdad0b0
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Fri Aug 25 20:44:47 2023 +0200

    Update azure-pipelines.yml for Azure Pipelines

commit 428ed39
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Fri Aug 25 20:35:16 2023 +0200

    Update WinUI Gallery project to include package file for CI

commit 812900a
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Fri Aug 25 17:21:42 2023 +0200

    Fix build errors

commit 91818c9
Author: Karen <7976322+karkarl@users.noreply.github.com>
Date:   Thu Aug 24 11:52:00 2023 -0700

    Update SolutionGallery variable

commit 4213edd
Merge: 91538f5 3e58993
Author: Scott Jones <scottj1s@gmail.com>
Date:   Thu Aug 24 11:40:10 2023 -0700

    Merge pull request microsoft#1332 from microsoft/user/karkarl/BuildFix

    Build Errors and Warning Fixes

commit 91538f5
Merge: 3a9999b c9f6b6a
Author: Karen <7976322+karkarl@users.noreply.github.com>
Date:   Thu Aug 24 11:29:48 2023 -0700

    Merge pull request microsoft#1289 from chingucoding/dev/create-ci

    Add initial CI pipeline with UI tests and axe scanning

commit c9f6b6a
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Thu Jun 1 18:18:19 2023 +0200

    Update page navigation logic to wait for fail if header cannot be found

commit 913286a
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Thu Jun 1 13:57:23 2023 +0200

    Refactor wait logic

commit bbae4ab
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed May 31 20:35:02 2023 +0200

    Remove obsolete code

commit 661a9a3
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed May 31 19:15:11 2023 +0200

    Fix compiler errors

commit 71e8c9d
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed May 31 18:28:41 2023 +0200

    Refactor tests

commit 7822b3f
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed May 31 17:54:58 2023 +0200

    Update script again

commit 87d6559
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed May 31 17:54:29 2023 +0200

    Fix generate test pfx script

commit 89fe573
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed May 31 17:50:52 2023 +0200

    Move build script

commit d378e34
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed May 31 17:43:06 2023 +0200

    First cr feedback

commit 1d345d5
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 18:53:57 2023 +0200

    Fix a11y issues (or ignore them)

commit 353049b
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 18:03:34 2023 +0200

    Add axe testing, add license headers

commit 977ec2a
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 15:21:58 2023 +0200

    Fix building tests project

commit 3c8f9c2
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 15:08:04 2023 +0200

    Refactor tests and fix test failures

commit 23933a2
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 13:34:05 2023 +0200

    Update app id, fix test failures

commit 345dccb
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 13:17:48 2023 +0200

    Update install script

commit 9bf82cc
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 13:06:47 2023 +0200

    Update install script, remove duplicate build

commit 6ab1257
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 12:52:39 2023 +0200

    Refactor UI tests project

commit 728ba04
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 12:40:25 2023 +0200

    Restructure pipeline

commit 981bf7a
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 12:37:37 2023 +0200

    Add certificate file

commit 93e6b22
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 12:27:51 2023 +0200

    Update package profiles

commit 0cd8314
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 12:08:44 2023 +0200

    Update build steps

commit 36f2001
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 12:00:00 2023 +0200

    Disable publish ready to run, formatting

commit 7db5cf9
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 11:45:41 2023 +0200

    Bump colorcode, use nuget installer

commit 2cfa73d
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 11:41:10 2023 +0200

    Update to use correct restore

commit 9c7feaa
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 11:37:49 2023 +0200

    Try fixing restore

commit 8a600a0
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Wed Apr 26 11:23:52 2023 +0200

    Add initial pipelines file

commit 3e58993
Author: Karen Lai <biilai@microsoft.com>
Date:   Wed Aug 23 11:46:46 2023 -0700

    fix warnings

commit 273e2a7
Author: Karen Lai <biilai@microsoft.com>
Date:   Wed Aug 23 11:24:47 2023 -0700

    add missing namespace

commit 3a9999b
Merge: 81209eb 72ddf1a
Author: Karen <7976322+karkarl@users.noreply.github.com>
Date:   Wed Aug 16 10:46:23 2023 -0700

    Merge pull request microsoft#1326 from microsoft/user/karkarl/MiscA11yFixes

    Miscellaneous Acessibility Fixes

commit 72ddf1a
Author: Karen Lai <biilai@microsoft.com>
Date:   Wed Aug 16 10:43:31 2023 -0700

    fix formatting

commit db3b00c
Author: Karen Lai <biilai@microsoft.com>
Date:   Wed Aug 16 10:35:55 2023 -0700

    fix typo

commit 1332979
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 15 10:02:16 2023 -0700

    revert

commit cf4a9f8
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 15 09:56:15 2023 -0700

    changes from comments

commit f8b173a
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 15 09:53:03 2023 -0700

    formatting

commit 81209eb
Author: Pratik Anand <pratik.preet@gmail.com>
Date:   Mon Aug 14 22:21:09 2023 -0700

    WinUI gallery unpackaged mode working + single project config for both packaged and unpackaged (microsoft#1329)

    Unpackaged mode no longer crashes on launch
    The WinUI gallery unpacakged mode was broken and crashed on launch - no matter whether building from msbuild cmd line or VS. It was happening because at some places in the code resource was getting accessed through URI which only makes sense for packaged app and not unpackaged. To remedy this, other parts of the code had separate code under UNPACKAGED which would build a non-URI path for unpackaged app config. This UNPACKAGED constant was not defined anywhere and as a result, that alternative code was not getting accessed. Some places had missing alternative code entirely.

    This PR removes dependence on UNPACKAGED compile time variable entirely.
    This PR side steps compile time variable for a easier to maintain runtime function which uses Appmodel/GetCurrentPackageId() system api to determine whether an app is running in packaged mode or unpackaged mode during runtime.

    Single project configuration
    As a need arose for cleaning up the project files for unpackaged winui gallery to work, I used this opportunity to build upon @Scottj1s 's work in unpkg-module branch and get rid of WAP configuration, have single project configuration for building any flavor of WinUI gallery.
    As a result, using launch configurations, you can build WinUI gallery in either packaged or unpackaged mode.
    I have introduced more solution configurations to aid in that.
    image

    If you want to build a Packaged winui gallery,
    select Packaged launch configuration and choose between Debug or Release solution configs.

    If you want to build a Unpackaged winui gallery,
    select Unpackaged launch configuration and choose between Debug-Unpackaged or Release-Unpackaged solution configs.

    A mix and match config will result in error because that's how Visual Studio works.

commit 3468301
Author: Karen Lai <biilai@microsoft.com>
Date:   Mon Aug 14 18:35:54 2023 -0700

    remove esc as back nav

commit 11a80f2
Author: Karen Lai <biilai@microsoft.com>
Date:   Mon Aug 14 18:34:10 2023 -0700

    add theme changed announcment

commit 0189c6f
Author: Karen Lai <biilai@microsoft.com>
Date:   Mon Aug 14 17:57:51 2023 -0700

    add automationproperties.name

commit 79dc855
Author: Karen Lai <biilai@microsoft.com>
Date:   Mon Aug 14 17:41:18 2023 -0700

    add x namespace to name

commit 1ffc48c
Author: Pratik Anand <pratik.preet@gmail.com>
Date:   Wed Aug 9 15:41:30 2023 -0700

    More changes for submodule (microsoft#1327)

    hardcoded version removed. Moved winappsdk to non-preview stable version.

commit 6ddf021
Author: Karen Lai <biilai@microsoft.com>
Date:   Wed Aug 9 11:46:24 2023 -0700

    announceactionforaccessibility

commit 710c173
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 8 19:28:46 2023 -0700

    AnnounceActionForAccessibility

commit 0a6db75
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 8 19:20:40 2023 -0700

    add success message and timer

commit 0b646b1
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 8 18:52:22 2023 -0700

    add manual focus

commit 8cdcea3
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 8 18:05:31 2023 -0700

    make copy button always visible

commit 6ff1a98
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 8 17:48:52 2023 -0700

    fix dark theme for colors pages

commit a19a66f
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 8 17:30:40 2023 -0700

    replace segemented with combobox

commit 8e727e5
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 8 15:13:19 2023 -0700

    fix theme toggle

commit 2512e59
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 8 11:42:53 2023 -0700

    correct backgroundColor

commit 3a25d14
Author: Karen Lai <biilai@microsoft.com>
Date:   Tue Aug 8 11:35:51 2023 -0700

    refactor inlineColorPicker with AP.labeledBy

commit f0a6a30
Author: Pratik Anand <pratik.preet@gmail.com>
Date:   Mon Aug 7 15:22:13 2023 -0700

    Merges unpkg-submodule branch into main, make the repo submodule ready (microsoft#1325)

    Takes changes made by Scott  Jones (@Scottj1s) to make WinUIgallery act as a submodule. It also gets rid of WAP project for a single project solution. More work needed in that area for supporting unpackaged apps.

commit 9b0d8f6
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Thu Jul 13 00:33:42 2023 +0200

    Fix a11y issue on InfoBadge sample (microsoft#1310)

    * Add tooltip to fix a11y issue

    * Fix sample code

    * Fix faulty formatting and icon

commit f0825ac
Author: Marcel Wagner <marcel.alex.wagner@outlook.com>
Date:   Sun Jul 9 17:31:04 2023 +0200

    Update URL on WebView 2 sample (microsoft#1314)

commit 2b68741
Author: James Pack <jamespack@users.noreply.github.com>
Date:   Sun Jul 2 13:12:05 2023 -0400

    Small spelling fix (microsoft#1307)

commit daff1e6
Merge: a3bc984 67ecd28
Author: Niels Laute <niels.laute@live.nl>
Date:   Tue Jun 27 00:08:25 2023 +0200

    Merge pull request microsoft#1294 from microsoft/niels9001/colortool-design-fixes

    [A11y] Increasing MinWidth of color textbox

commit 67ecd28
Author: Niels Laute <niels.laute@live.nl>
Date:   Mon Jun 19 12:18:12 2023 +0200

    Update AccessibilityColorContrastPage.xaml

commit 181ba7f
Author: Niels Laute <niels.laute@live.nl>
Date:   Wed Jun 7 15:55:32 2023 +0200

    Fix spacing

commit 4fe299c
Author: Niels Laute <niels.laute@live.nl>
Date:   Wed May 17 10:25:04 2023 +0200

    Increasing MinWidth of color textbox
@karkarl karkarl deleted the user/karkarl/MiscA11yFixes branch February 12, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants