Skip to content

Add AutoProp.Name to font features/axes controls#19712

Merged
carlos-zamora merged 1 commit intomainfrom
dev/cazamor/a11y/font-settings
Jan 7, 2026
Merged

Add AutoProp.Name to font features/axes controls#19712
carlos-zamora merged 1 commit intomainfrom
dev/cazamor/a11y/font-settings

Conversation

@carlos-zamora
Copy link
Member

@carlos-zamora carlos-zamora commented Jan 6, 2026

Summary of the Pull Request

Explicitly adds the Name automation property to the list view items (via grid in data template), number boxes, and delete buttons for font features and axes.

Validation Steps Performed

Narrator can read out...
✅ list view items
✅ number boxes
✅ delete button
Also validated using accessibility insights

Closes #19695
Closes #19689


winrt::hstring FontKeyValuePair::AutomationName()
{
return hstring{ fmt::format(FMT_COMPILE(L"{}: {}"), KeyDisplayStringRef(), _value) };
Copy link
Member

Choose a reason for hiding this comment

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

What's Ref from?

Copy link
Member

Choose a reason for hiding this comment

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

Oh. It's just a... it just returns a reference. Sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

There's two versions: KeyDisplayStringRef() and KeyDisplayString(). They both do the same thing, but there's a funny comment on the Ref version:

winrt::hstring FontKeyValuePair::KeyDisplayString()
{
return KeyDisplayStringRef();
}
// You can't return a const-ref from a WinRT function, because the cppwinrt generated wrapper chokes on it.
// So, now we got two KeyDisplayString() functions, because I refuse to AddRef/Release this for no reason.
// I mean, really it makes no perf. difference, but I'm not kneeling down for an incompetent code generator.
const winrt::hstring& FontKeyValuePair::KeyDisplayStringRef()

@carlos-zamora carlos-zamora enabled auto-merge (squash) January 6, 2026 23:42
@carlos-zamora carlos-zamora merged commit baab0ea into main Jan 7, 2026
18 of 20 checks passed
@carlos-zamora carlos-zamora deleted the dev/cazamor/a11y/font-settings branch January 7, 2026 00:41
DHowett pushed a commit that referenced this pull request Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants