Skip to content

Commit

Permalink
Fixes Narrator not reading Name of tab when drag is starting (#6964)
Browse files Browse the repository at this point in the history
* Fixes narrator now reading which item was grabbed on drag

* Add comment
  • Loading branch information
bkudiess authored Apr 12, 2022
1 parent 4389962 commit 9349a0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dev/TabView/TabViewItemAutomationPeer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ TabViewItemAutomationPeer::TabViewItemAutomationPeer(winrt::TabViewItem const& o
// IAutomationPeerOverrides
winrt::IInspectable TabViewItemAutomationPeer::GetPatternCore(winrt::PatternInterface const& patternInterface)
{
if (patternInterface == winrt::PatternInterface::SelectionItem)
// We subclass from ListViewItemAutomationPeer without using everything from it,
// so we need to make sure we are returning TabViewItem's AutomationPeer for selection and drag, and not the parent class version
if (patternInterface == winrt::PatternInterface::SelectionItem || patternInterface == winrt::PatternInterface::Drag)
{
return *this;
}
Expand Down

0 comments on commit 9349a0f

Please sign in to comment.