question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide query option to respect accessibility

See original GitHub issue

Describe the Feature

This issue is based on #787 PR. That PR is stale but idea seems worth pursuing.

Currently all queries ignored accessibility ignored the fact that certain element, e.g. screen or modal is present in component tree but not really visible to the user.

This problem largely does not exist in web React world as previous screens are removed from component tree, except modals, but it is relevant in React Native world. We even suggest some work arounds for it with within function.

Possible Implementations

  • Add additional respectAccessibility query options for all queries. This query options would be common to all query verbs (getBy, etc) and predicates (byText, etc).
  • By default it should be disabled to preserve API stability
  • If set explicitly to true it would ignore elements that are not accessible, by analysing e.g. accessibilityElementsHidden, importantForAccessibility, accessibilityViewIsModal, style={{ display: 'none' }}, etc
  • Consider switching this option to true by default by introducing a breaking change in next major release, as having it on by default is probably what users would expect.
  • We could salvage some a11y predicate code and possibly all tests from #787

Related Issues

  • #787 for initial idea

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MattAgncommented, Jul 27, 2022

I would also love to have that feature! @mdjastrzebski Can I help finishing the implementation?

1reaction
mdjastrzebskicommented, Aug 1, 2022

@MattAgn please do! 💯 This would be a very useful feature to have in RNTL!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Meet WCAG (Quick Reference)
A customizable quick reference to Web Content Accessibility Guidelines (WCAG) 2 ... Provide text alternatives for any non-text content so that it can...
Read more >
Handling common accessibility problems - MDN Web Docs
Hopefully this article has given you a good grounding in the main accessibility problems you might encounter, and how to test and overcome ......
Read more >
Query access control | Databricks on AWS
Manage query permissions using the UI · Click Queries Icon Queries in the sidebar. · Click a query. · Click the Share Button...
Read more >
Use advanced search with Jira Query Language (JQL)
The advanced search allows you to build structured queries using Jira Query Language (JQL) to search for issues in Jira Service Management.
Read more >
Caching content based on query string parameters
If you're using signed URLs to restrict access to your content (if you added trusted signers to your distribution), CloudFront removes the following...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found