Skip to content

Commit

Permalink
For mozilla-mobile#10285: Add a custom TextView for links with a11y i…
Browse files Browse the repository at this point in the history
…mprovements.
  • Loading branch information
mcarare committed Jun 2, 2020
1 parent 2591fc8 commit 32903fb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
8 changes: 0 additions & 8 deletions app/src/main/java/org/mozilla/fenix/utils/LinkTextView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ class LinkTextView @JvmOverloads constructor(
"AccessibilityNodeInfo.roleDescription",
context.resources.getString(R.string.link_text_view_type_announcement)
)

val customClick =
AccessibilityNodeInfo.AccessibilityAction(
AccessibilityNodeInfo.ACTION_CLICK,
context.resources.getString(R.string.link_text_view_action_click_announcement)
)

info?.addAction(customClick)
// disable long click announcement, as there is no action to be performed on long click
info?.isLongClickable = false
info?.removeAction(ACTION_LONG_CLICK)
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,4 @@

<!-- Content description (not visible, for screen readers etc.) used to announce [LinkTextView]. -->
<string name="link_text_view_type_announcement">link</string>
<!-- Action description for click (not visible, for screen readers etc.) for [LinkTextView]. -->
<string name="link_text_view_action_click_announcement">Follow link</string>
</resources>

0 comments on commit 32903fb

Please sign in to comment.