-
Notifications
You must be signed in to change notification settings - Fork 528
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
Fix #3300: Add check for accessibility label for activities #3352
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Sparsh1212. Just had 2 comments, otherwise this LGTM.
scripts/src/javatests/org/oppia/android/scripts/label/AccessibilityLabelCheckTest.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as requested to avoid this PR being accidentally merged before the last 2 comments are resolved.
scripts/src/javatests/org/oppia/android/scripts/label/AccessibilityLabelCheckTest.kt
Show resolved
Hide resolved
@BenHenning Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Sparsh1212! LGTM.
Explanation
Fixes #3300: Add check for accessibility labels for activities
The script parses the
AndroidManifest.xml
file of theapp
layer to ensure that theactivity
elements are defined with accessibility labels.Note: The Activities listed in the
ACCESSIBILITY_LABEL_CHECK_EXEMPTIONS_LIST
will be skipped for this check, and currently, all the activities which were failing this check, have been added to this list so that the workflow doesn't fail.We can remove any Activity from the exemption list, where we think that we can't go without a label for that Activity, or if a label is added for that Activity.
To run the script, use:
bazel run //scripts:accessibility_label_check -- $(pwd) app/src/main/AndroidManifest.xml
For testing the script, automated tests have been added.
To execute the tests, use:
bazel test //scripts:AccessibilityLabelCheckTest
Note: We are generating the test assets dynamically at the time of executing them. The test assets are automatically deleted when the test finishes.
SS when the CI check fails:
Checklist