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

[UWP][Accessibility] Use element tag instead of access key for internal tracking #3820

Merged
merged 3 commits into from
Mar 9, 2020

Conversation

RebeccaAnne
Copy link
Contributor

@RebeccaAnne RebeccaAnne commented Mar 5, 2020

Related Issue

Fixes #3819

Description

The WholeItemsPanel keeps track of which items have been marked as "height":"stretch" in order to render them properly. In order to do this, the code was stashing an identifier in the AccessKey property of the xaml elements (#1377). Unfortunately, that was causing access keys to show up in the UI when the user presses 'Alt'.

image

Updated the code to use the Tag property to handle this internal tracking, as that is a place for custom data that won't have a UI impact. Because we're already using the Tag property for a variety of purposes, added the IsStretchable property to the existing ElementTagContent type.

How Verified

Confirmed that the card from bug #3819 no longer generates an access key. Verified existing VerticalStretch cards still render correctly.

Microsoft Reviewers: Open in CodeFlow

Copy link
Member

@jwoo-msft jwoo-msft left a comment

Choose a reason for hiding this comment

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

:shipit:

else
{
ComPtr<IElementTagContent> tagContent;
THROW_IF_FAILED(MakeAndInitialize<ElementTagContent>(&tagContent, nullptr, nullptr, nullptr, nullptr, false, true));
Copy link
Contributor

@almedina-ms almedina-ms Mar 6, 2020

Choose a reason for hiding this comment

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

what are all these nullptr and booleans? Could we get a comment to make it more descriptive? #Resolved

Copy link
Contributor Author

@RebeccaAnne RebeccaAnne Mar 6, 2020

Choose a reason for hiding this comment

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

They're non-relevant constructor parameters. But this is silly. Added a constructor that doesn't take all this to allow callers to construct a default tag content object and make the code a little clearer.


In reply to: 389054235 [](ancestors = 389054235)

@RebeccaAnne RebeccaAnne merged commit c8474d7 into master Mar 9, 2020
@RebeccaAnne RebeccaAnne deleted the rebecch/accesskey branch March 9, 2020 17:32
@shalinijoshi19 shalinijoshi19 added Area-Accessibility Bugs around feature accessibility Platform-XAML Bugs or features related to Xaml Renderer MsftCortana-Integration and removed Area-Accessibility Bugs around feature accessibility MsftCortana-Integration Platform-XAML Bugs or features related to Xaml Renderer labels Mar 13, 2020
@paulcam206 paulcam206 changed the title [UWP][Accessability] Use element tag instead of access key for internal tracking [UWP][Accessibility] Use element tag instead of access key for internal tracking Mar 27, 2020
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.

[UWP][Accessibility] Unexpected access keys appearing for select actions
4 participants