Skip to content

Conversation

@jonthysell
Copy link
Contributor

@jonthysell jonthysell commented Jun 18, 2019

Microsoft Reviewers: Open in CodeFlow

@jonthysell jonthysell requested a review from a team as a code owner June 18, 2019 19:16
@ghost ghost added the vnext label Jun 18, 2019

void DynamicAutomationPeer::AddToSelection() const
{

Copy link
Contributor

Choose a reason for hiding this comment

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

should it throw exception that not implemented

Copy link
Member

@ahimberg ahimberg left a comment

Choose a reason for hiding this comment

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

:shipit:

}

shouldBeControl = (pViewShadowNode->AccessibilityRole() != AccessibilityRoles::None);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should not happen if propertyValue.isNull() is true, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think shouldBeControl needs to be true if we modify accessiblity properties, because otherwise they're no-opts without the DynamicAutomationPeer.

Copy link
Contributor

Choose a reason for hiding this comment

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

But if they all go back to a state of not needing the peer why would we keep it? I don't know that the dynamic case like this would be common, but it seems odd to keep it as a Control when that's not needed. We've tried to update these conditions on properties so the result is accurate when a property is no longer bound.


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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But isn't this method run only to update properties that have changed? If the first batch sets a property that requires a control, a later batch trying to change a different property can't decide to get rid of that control. We need a way of maintaining when we need the automationpeer.

}
}

shouldBeControl = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldBeControl = true; [](start = 8, length = 23)

As above, I don't think this should happen if propertyValue.isNull() is true.

Copy link
Contributor

@randy-flynn randy-flynn left a comment

Choose a reason for hiding this comment

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

:shipit:

disabled = viewControl->AccessibilityState(::react::uwp::AccessibilityStates::Disabled);
}
}
catch (winrt::hresult_error const & ex) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why exception here? If it's because viewControl memory is freed, this code would be very dangerous, and I prefer not to ship this feature until the problem is resolved.
Even if it's not crash in debug version, how about release version?

@jonthysell jonthysell merged commit 4593056 into microsoft:master Jun 20, 2019
@jonthysell jonthysell deleted the accSelectedDisabled branch June 20, 2019 22:17
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.

4 participants