-
Notifications
You must be signed in to change notification settings - Fork 533
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
BUG: Fix All warnings in "Accessibility" category #5171
Comments
@the-mr17, PTAL. |
@the-mr17, could you also please fill this out: https://docs.google.com/forms/d/e/1FAIpQLSes4wj7oKtiN0iyUwd-Xt_DAOr1b-MHG9_YYIavWBF4G6g8uA/viewform |
@adhiamboperes Sure, But I have some queries regarding this: |
@the-mr17 if you select oppia-android then it give right section. |
Sorry -- the form was incorrectly configured, if you refresh it it should show you the Android section now. |
<!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Fixes #5171 Under this category, the warnings are mainly of 3 types: 1. Warning: Image without contentDescription. Fix: Add a `contentDescription` to each of those `ImageView`, or mark as not important for accessibility. 2. Warning: 'onTouch' lambda should call 'View#performClick' when a click is detected Fix: Call `customView.performClick( )`. 3. Warning: 'clickable' attribute found, please also add 'focusable'. Fix: Set `android:focusable="true"` as its necessary if `android:clickable="true"`. ![image](https://github.com/oppia/oppia-android/assets/84731134/894a6fb3-632b-4397-bc80-16b60d06f5f2) ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing --------- Co-authored-by: Adhiambo Peres <[email protected]>
Description
We would like to fix all the remaining lint issues on Oppia Android in "Accessibility" category.
Steps To Reproduce
Run the following command from a terminal in a checked-out Oppia Android repo:
./gradlew :app:lint
Output: All warnings in "Accessibility" category
Under this category, the warnings are mainly of 3 types.
Warning: Image without contentDescription.
Fix: Add a contentDescription to each of those ImageView, or android:importantForAccessibility="no" for views that are safe to ignore.
Warning: 'onTouch' lambda should call 'View#performClick' when a click is detected
Fix: Call customView.performClick( ).
Warning: 'clickable' attribute found, please also add 'focusable'.
Fix: Set android:focusable="true" to allow keyboard navigation per: https://android.googlesource.com/platform/tools/base/+/studio-master-dev/lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/KeyboardNavigationDetector.java?autodive=0%2F.
Expected Behavior
Running the command above should not show any errors.
The text was updated successfully, but these errors were encountered: