feat(framework-issues-logic): Split IsControlElementTrueRequired into 3 rules #706
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
This breaks the
IsControlElementTrueRequired
rule into 3 rules:IsControlElementTrueRequiredButtonWPF
is restricted to WPF Buttons. We don't have a GitHub issue for the rule, but the steps are documented at https://docs.microsoft.com/en-us/accessibility-tools-docs/items/wpf/control_iscontrolelement#suggested-fixIsControlElementTrueRequiredTextInEditXAML
is restricted to XAML Text elements inside an edit control. The docs will eventually point to [Accessibility] AutoSuggestBox and NumberBox PlaceholderText fails Accessibility Insights Pass microsoft-ui-xaml#6480, which is the issue tracking this behavior in the XAML frameworkIsControlElementTrueRequired
is updated to exclude controls covered by the 2 previous rules.Unit tests have been added (there were none for
IsControlElementTrueRequired
😦 ), and the docs have been updated.Motivation
Framework issue feature
Context
I changed the 2nd rule name slightly from the spec to better match its behavior. As a result, the link and the docs are slightly different from the rule name. We may want to make a pass through everything at the end of the feature to align everything.
Looking at
MonsterTest.cs
, we have a lot of rules that aren't reflected in the results. If the intent is to use this as a rule pin, then we'll need to refactor that a little bit. That feels like a separate PR.Pull request checklist