- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.1k
Add a11y guide and tweak references #5957
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
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            28 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      fd7e42c
              
                fix link
              
              
                marktnoonan 2b467be
              
                initial pass at guide
              
              
                marktnoonan 70ce39c
              
                fix missing label
              
              
                marktnoonan 47c711a
              
                various text updates
              
              
                marktnoonan 5152c28
              
                cleanup and clarity
              
              
                marktnoonan db9fe83
              
                cleanup and clarity
              
              
                marktnoonan a94c9d6
              
                cleanup and clarity
              
              
                marktnoonan ecad352
              
                cleanup and clarity
              
              
                marktnoonan 8a11e6a
              
                remove quotes
              
              
                marktnoonan f1129a7
              
                lint fix
              
              
                marktnoonan 19f9180
              
                cleanup and clarity
              
              
                marktnoonan 8404787
              
                Update docs/accessibility/get-started/introduction.mdx
              
              
                marktnoonan f6e27f7
              
                Update docs/app/guides/accessibility-testing.mdx
              
              
                marktnoonan 0cdd5f4
              
                Update docs/app/guides/accessibility-testing.mdx
              
              
                marktnoonan 36225b4
              
                Apply suggestions from code review
              
              
                marktnoonan 6621c14
              
                cleanup and clarity
              
              
                marktnoonan 2106ca4
              
                Apply suggestions from code review
              
              
                marktnoonan 32585c7
              
                add managing performance section
              
              
                marktnoonan 2ded988
              
                Merge branch 'a11y-ga-updates' of https://github.com/cypress-io/cypre…
              
              
                marktnoonan 43ddb22
              
                add how it works section
              
              
                marktnoonan df4dbf9
              
                update text and images
              
              
                marktnoonan d25fc6e
              
                add test replay link
              
              
                marktnoonan cb55822
              
                mention ARIA, other minor edits
              
              
                marktnoonan 88e7923
              
                tweaks
              
              
                marktnoonan 4f4369c
              
                remove summary that isn't needed
              
              
                marktnoonan e16af31
              
                Merge branch 'ga-ui-cov-a11y' into a11y-ga-updates
              
              
                marktnoonan 9189618
              
                lint fix
              
              
                marktnoonan 94a25eb
              
                fix bad link
              
              
                marktnoonan File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| sidebar_label: 'How it works' | ||
| title: 'How it works' | ||
| description: Cypress Accessibility\'s checks are powered by Axe Core® from Deque Systems. | ||
| sidebar_position: 40 | ||
| --- | ||
|  | ||
| # How it works | ||
|  | ||
| The stages of the Cypress Accessibility process are as follows: | ||
|  | ||
| 1. As your run is recorded and specs are uploaded to Cypress Cloud, accessibility checks begin, based on the incoming [Test Replay](/cloud/features/test-replay) data, on the Cypress Cloud servers. | ||
| 1. When your run completes, the final specs are processed for accessibility checks. All earlier specs have already entered processing and are likely completed by the end of the run. | ||
| 1. Cypress Cloud organizes all the the Views (pages and components) that were rendered during the run, merging and deduplicating across tests so that page-level results and live DOM snapshots can be grouped together. | ||
| 1. A combined "rule-level" report is created. | ||
| 1. The completed results are displayed in Cypress Cloud and are flagged in integrations such Slack as GitHub/Gitlab comments, and available CI via the Results API so that you can optionally fail your pipeline if your standards are not met. | ||
|  | ||
| ## About Axe Core® | ||
|  | ||
| Axe Core® is an open source library for detecting accessibility violations. It is used widely in the industry and have over 1 billion total downloads on npm. | ||
| The library may be familiar from other tools, such as Lighthouse, or tools used for code linting, mobile testing and more, and has also been used extensively in Cypress tests through open-source packages (discussed more our [accessibility testing guide](/app/guides/accessibility-testing)). This means that Cypress Accessibility's | ||
| configuration can often be easily aligned with your existing accessibility standards across different teams and platforms. | ||
|  | ||
| Axe Core® checks for accessibility violations in your website's user interface, based on common accessibility standards. A violation detected by Axe usually indicates that some users with disabilities would have a problem using or perceiving a feature. An example of a violation would be an image without alternative text provided in the markup, which means the content is not perceivable to visually-impaired users. [Learn more about Axe.](https://github.com/dequelabs/axe-core) | ||
|  | ||
| While this process reaches a high standard for automated testing, it cannot test every possible aspect of compliance, especially for heavily custom interfaces or aspects requiring human judgment. | ||
|  | ||
| This means that a 100% axe score does not mean all possible accessibility errors have been ruled out. Deque reports that [Axe Core® can detect up to 57% of the issues that would appear in a manual accessibility audit](https://www.deque.com/blog/automated-testing-study-identifies-57-percent-of-digital-accessibility-issues/). | ||
|  | ||
| The value of this form of testing in Cypress Accessibility is to give you fast, reliable, easy-to-understand feedback about common accessibility mistakes that are found in most projects. Providing these results automatically as part of your test run means that you can find and fix these issues with minimal friction, shifting accessibility left in your software development lifecycle. | ||
|  | ||
| ## Test Replay limitations | ||
|  | ||
| Because Cypress Accessibility uses data captured through the Test Replay protocol, it is subject to any [limitations of that protocol](https://docs.cypress.io/faq/questions/cloud-faq#Is-everything-captured-and-replayed-in-Test-Replay) related to data capture or browser support. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -220,16 +220,24 @@ If the answer is **no** because the text could be changed - then use | |
|  | ||
| Cypress loves the Testing Library project. We use Testing Library internally, | ||
| and our philosophy aligns closely with Testing Library's ethos and approach to | ||
| writing tests. We strongly endorse their best practices. | ||
| writing tests. We strongly endorse their best practices for situations where, | ||
| as with `cy.contains()`, you want to fail a test if a specific piece of content or | ||
| accessible role is not present. | ||
|  | ||
| You can use the | ||
| [Cypress Testing Library](https://testing-library.com/docs/cypress-testing-library/intro/) | ||
| package to use the familiar testing library methods (like `findByRole`, | ||
| `findByLabelText`, etc...) to select elements in Cypress specs. | ||
|  | ||
| In particular, if you're looking for more resources to understand how we | ||
| If you are coming from a React Testing Library background and looking for more resources to understand how we | ||
| recommend you approach testing your components, look to: [Cypress Component Testing](/app/component-testing/get-started). | ||
|  | ||
| ### Accessibility Testing | ||
|  | ||
| Selecting elements with data attributes, text content, or Testing Library locators can each have some different implications for accessibility, | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍🏻 | ||
| but none of these approaches is a "complete" accessibility test, and you will always need additional, accessibility-specific testing (including automated and manual tests) to confirm | ||
| your application is working as expected for people with disabilities and the technology they use. See[our accessibility testing guide](/app/guides/accessibility-testing) for more details and comparisons of approaches. | ||
|  | ||
| ## <Icon name="angle-right" /> Assigning Return Values | ||
|  | ||
| :::danger | ||
|  | ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻