firefox-ios icon indicating copy to clipboard operation
firefox-ios copied to clipboard

[Accessibility] Use accessibilityIdentifier when accessibilityLabel isn't user-friendly

Open mozillamobilebot opened this issue 6 years ago • 1 comments

From https://bugzilla.mozilla.org/show_bug.cgi?id=1134757

The comment in [1] brought to our attention the fact iOS provides support for an accessibility identifier that is intended exclusively for unit tests. These identifiers are internal, non-user-facing IDs that can live alongside accessibility labels. For the reasons described at [2], which I agree with, we should prefer labels over identifiers when possible.

One place we may want to use an identifier over the label is the URL bar. Typically, the labels for text fields are the text field contents themselves; however, we set the URL bar label to "Address and Search" to make it easy to grab in KIF tests. That hurts accessibility since the user can't use VoiceOver to get the actual contents of the field.

[1] https://github.com/mozilla/firefox-ios/pull/137#issuecomment-73356886 [2] https://github.com/kif-framework/KIF/issues/243#issuecomment-23363722

┆Issue is synchronized with this Jira Task

mozillamobilebot avatar May 16 '19 21:05 mozillamobilebot

@farhanpatel / @thebnich -- Is this open for contribution? and is the ask to just update the accessibility label attribute on the URL Bar?

dfperry5 avatar Sep 19 '22 22:09 dfperry5

Hi @dfperry5, this can be open to contributions. The issue description is quite generic thought, if URL bar is missing some a11y identifiers then we can use this task for this. Just an FYI, we have a file called AccessibilityIdentifiers.swift where we define the a11y identifiers. If any part of the UI is missing a11y identifiers, then we can create an identifier following AccessibilityIdentifiers.swift file instructions (the comment at the top of the file) and use that identifier in code. Hope this helps!

lmarceau avatar Sep 22 '22 13:09 lmarceau

It does a ton! Thank you @lmarceau - ill give it a shot this weekend!

dfperry5 avatar Sep 23 '22 01:09 dfperry5

This issue has been automatically marked as stale. Has the issue been fixed, or does it still require the community's attention? Please leave any comment to keep this issue opened. It will be closed automatically if no further update occurs in the next 30 days. Thank you for your contributions!

github-actions[bot] avatar Mar 11 '24 00:03 github-actions[bot]