Skip to content

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

Merged
Carlos Zamora (carlos-zamora) merged 1 commit into
mainfrom
dev/cazamor/a11y/font-settings
Jan 7, 2026
Merged

Carlos Zamora (carlos-zamora) merged 1 commit into
mainfrom
dev/cazamor/a11y/font-settings

Conversation

@carlos-zamora

@carlos-zamora Carlos Zamora (carlos-zamora) commented Jan 6, 2026 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor 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 (carlos-zamora) merged commit baab0ea into main Jan 7, 2026
18 of 20 checks passed
@carlos-zamora
Carlos Zamora (carlos-zamora) deleted the dev/cazamor/a11y/font-settings branch January 7, 2026 00:41
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