Skip to content

Conversation

@0x5bfa
Copy link
Member

@0x5bfa 0x5bfa commented Dec 24, 2025

Resolved / Related Issues

This is part of the phase 1 mentioned in #17970 (comment)

Steps used to test these changes

  • Check if an item has an icon
  • Check if an item has a text
  • Check if an item has a tooltip
  • Check if an item has a correct decorator (pin icon, or eject button, etc)

private void UpdateIcon()
{
Icon = Item?.IconSource?.CreateIconElement();
if (Icon is not null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we no longer doing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

We are now using binding for icons, we cannot call CreateIconElement in XAML.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, why are we no longer setting the UIA property appropriately? Also just because something doesnt work in xaml doesnt mean we should just ignore what the code did before.

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't we set it in XAML today already?

<!-- Icon -->
<ContentPresenter
x:Name="IconPresenter"
Grid.Column="1"
Width="16"
Height="16"
Margin="8,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
AutomationProperties.AccessibilityView="Raw"
Content="{Binding Icon, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />

Copy link
Contributor

Choose a reason for hiding this comment

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

AccessibilityView is not a transitive property so every element needs to set it themselves. Just setting it on the presenter does not exclude its children from showing up in the UIA tree

@0x5bfa 0x5bfa marked this pull request as draft December 29, 2025 07:03
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.

2 participants