Provide query option to respect accessibility
See original GitHub issueDescribe 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:
- Created a year ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would also love to have that feature! @mdjastrzebski Can I help finishing the implementation?
@MattAgn please do! 💯 This would be a very useful feature to have in RNTL!