Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(target-size-automation): Update target size requirement to be assisted #7331

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

madalynrose
Copy link
Contributor

@madalynrose madalynrose commented May 9, 2024

Details

This updates the Target Size requirement in the Pointer Motion assessment to use the new 'target-size' axe-core rule and display the results in an instances table.

The needs for the instances table are a little different than what has been needed for similar requirements in the past:

  • it runs two checks under the hood that have properties in common, meaning that data is overwritten when they both run on an instance. additional code was needed to ensure data from both the target-size and the target-offset checks was included.
    • created the generateTargetSizePropertyBagFrom function and added it to the Requirement type to be used in AssessmentDataConverter.
  • the data getting shown to the user is all text, so the text needs some styling to enable the user to quickly scan the instances table and make decisions.
    • TargetSizeColumnRenderer generates the stylized text component based on the item's propertyBag. TargetSizeColumnRendererFactory is used inside the Requirement to make this happen.
    • getTargetSizeMessageComponentFromPropertyBag and getTargetOffsetMessageComponentFromPropertyBag functions that are used under the hood in TargetSizeColumnRenderer are used directly in the Requirement's reportInstanceFields.
  • A new resultProcessor (scanner.getAllApplicableInstances) was created for this instances table, as we need pass, fail, and incomplete instances for the user, not just completed instances.

In order to test this locally, test resources have been added at src/tests/end-to-end/test-resources/target-size.

Motivation

feature work

Context

Right now, this PR includes cursory tests for the TargetSizeColumnRendererFactory and TargetSizeColumnRenderer but other new functionality does not have corresponding unit tests.

Additional work will be done to add target-size as a needs review rule and to add additional telemetry for this requirement.

Pull request checklist

  • Addresses an existing issue: #0000
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • (UI changes only) Added screenshots/GIFs to description above
  • (UI changes only) Verified usability with NVDA/JAWS

@madalynrose madalynrose requested a review from a team as a code owner May 9, 2024 20:54
@madalynrose madalynrose marked this pull request as draft May 9, 2024 20:55
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.

1 participant