diff --git a/docs/accessibility/changelog.mdx b/docs/accessibility/changelog.mdx
index 1ee1019fed..82b4abd1a6 100644
--- a/docs/accessibility/changelog.mdx
+++ b/docs/accessibility/changelog.mdx
@@ -9,6 +9,15 @@ sidebar_position: 200
# Changelog
+## Week of 12/12/2025
+
+- You can now create Jira issues directly from accessibility violations in the detail view. This allows you to quickly track and prioritize accessibility issues within your existing Jira workflow. The created Jira issue will include a link back to the accessibility violation in Cypress Cloud. [Learn more about creating Jira issues](/accessibility/core-concepts/inspecting-violation-details#create-jira-issue).
+
+## Week of 12/1/2025
+
+- The `profiles` configuration property allows you to use different configuration settings for different runs based on [run tags](/app/references/command-line#cypress-run-tag-lt-tag-gt). This enables you to customize accessibility testing behavior for different environments, branches, or test scenarios. See the [Profiles](/accessibility/configuration/profiles) guide for more details.
+- All configuration objects now support an optional `comment` property that you can use to provide context and explanations for why certain values are set. This helps make your configuration easier to understand and maintain, especially when working in teams or revisiting configuration after some time.
+
## Week of 10/13/2025
- Individual rules, or set of rules, can now be ignored for specific elements using [a `data-a11y-ignore` attribute](/accessibility/configuration/ignoring-rules-per-element).
diff --git a/docs/accessibility/configuration/overview.mdx b/docs/accessibility/configuration/overview.mdx
index eac51fe0bf..853e3fbde1 100644
--- a/docs/accessibility/configuration/overview.mdx
+++ b/docs/accessibility/configuration/overview.mdx
@@ -22,50 +22,88 @@ To add or modify the configuration for your project, navigate to the "App Qualit
alt="The Cypress Cloud UI showing the configuration editor"
/>
-You can use the provided editor to write configuration in JSON format. A complete configuration with all available options looks as follows:
+You can use the provided editor to write configuration in JSON format.
-```typescript
+After new configuration changes have been saved, you can reprocess any historical run using the "regenerate" button on the properties tab where the configuration values that were used for that run are displayed.
+
+This allows you to iterate on the config quickly without having to execute test runs and wait for the results. You can try out different configurations and see what effects your changes have to make sure everything works the way you intend.
+
+### Viewing Configuration for a Run
+
+You can view configuration information for each run in the Properties tab, as shown below. This configuration is determined when your run begins.
+
+
+
+### Comments
+
+All configuration objects support an optional `comment` property that you can use to provide context and explanations for why certain values are set. This helps make your configuration easier to understand and maintain, especially when working in teams or revisiting configuration after some time.
+
+```json
+{
+ "elementFilters": [
+ {
+ "selector": "[data-testid*='temp']",
+ "include": false,
+ "comment": "Exclude temporary test elements from accessibility reports"
+ }
+ ]
+}
+```
+
+### Profiles
+
+The `profiles` property allows you to use different configuration settings for different runs based on [run tags](/app/references/command-line#cypress-run-tag-lt-tag-gt). See the [Profiles](/accessibility/configuration/profiles) guide for more details.
+
+### Complete configuration example
+
+A complete configuration with all available options looks as follows:
+
+```json
{
"views": [
{
"pattern": string,
"groupBy": [
string
- ]
+ ],
+ "comment": string
}
],
"viewFilters": [
{
"pattern": string,
- "include": boolean
+ "include": boolean,
+ "comment": string
}
],
"elementFilters": [
{
"selector": string,
- "include": boolean
+ "include": boolean,
+ "comment": string
}
],
"significantAttributes": [
string
- ]
+ ],
"attributeFilters": [
{
"attribute": string,
"value": string,
- "include": boolean
+ "include": boolean,
+ "comment": string
+ }
+ ],
+ "profiles": [
+ {
+ "name": string,
+ "config": {
+ // Any App Quality configuration options
+ }
}
]
}
```
-
-Note that these root-level App Quality configuration properties (`elementFilters`, `views`, and `viewFilters`) impact both UI Coverage and Accessibility.
-
-### Viewing Configuration for a Run
-
-You can view configuration information for each run in the Properties tab, as shown below. This is the configuration set for the project at the start of the run.
-
-
diff --git a/docs/accessibility/configuration/profiles.mdx b/docs/accessibility/configuration/profiles.mdx
new file mode 100644
index 0000000000..43cf2bf252
--- /dev/null
+++ b/docs/accessibility/configuration/profiles.mdx
@@ -0,0 +1,12 @@
+---
+sidebar_label: profiles
+title: 'Profiles | Cypress Accessibility'
+description: 'The `profiles` configuration property allows you to create configuration overrides that are applied based on run tags.'
+sidebar_position: 100
+---
+
+
+
+# profiles
+
+
diff --git a/docs/accessibility/core-concepts/compare-reports.mdx b/docs/accessibility/core-concepts/compare-reports.mdx
index bbffe3f60a..344238e669 100644
--- a/docs/accessibility/core-concepts/compare-reports.mdx
+++ b/docs/accessibility/core-concepts/compare-reports.mdx
@@ -164,3 +164,17 @@ It's likely that your tests have never been used for always-on accessibility tes
For example, sometimes the test may spend enough time on a page to see a confirmation message after a form is submitted, unless the server response is slow, then the test may finish without rendering the state.
There are different solutions depending on the nature of the issue. If you want to ensure the state is always picked up in Cypress Accessibility, you can add some assertion about that state to your tests. On the other hand, if you do not want to account for this state at all, it can be ignored with [`elementFilters`](/accessibility/configuration/elementfilters) configuration. Either approach will lead to a more stable branch comparison.
+
+## Optimizing for Pull Request reviews
+
+If you plan to use branch comparison for investigating Pull Requests that have been blocked through the Results API for not meeting your standard, it's useful to implement this in a gradual way, prioritizing the developer experience at first.
+
+Choose a scope of rules, page, and elements that reduces ambiguity. A good starting point is something like "We will fail a build if it introduces new critical issues on the login or checkout page."
+
+If your application is unstable between runs in terms of content, pages, or different states reached, fine tune your configuration to ignore the unstable parts of the DOM that have issues already. These can be documented and dealt with on their own.
+
+When everything is dialled in correctly, the Branch Review diff will be 100% clean, unless something has actually changed in an area you didn't already know about. This gives you the highest confidence that if an issue is blocking a merge, it is genuinely a new problem introduced by the incoming Pull Request.
+
+If the team is not already familiar with accessibility, it's useful to consider which rules to start with. See the [starting from scratch guide](/accessibility/guides/improve-accessibility) for suggestions about this.
+
+If multiple teams are working on the same project and need accessibility results to be isolated from each other, consider splitting runs into dedicated Cypress projects or using [configuration profiles](/accessibility/configuration/profiles) so that each team can have a customized report for the areas they are responsible for.
diff --git a/docs/accessibility/core-concepts/inspecting-violation-details.mdx b/docs/accessibility/core-concepts/inspecting-violation-details.mdx
index ce75d4cbea..df4f3c0965 100644
--- a/docs/accessibility/core-concepts/inspecting-violation-details.mdx
+++ b/docs/accessibility/core-concepts/inspecting-violation-details.mdx
@@ -36,7 +36,7 @@ Clicking on an element in the expanded Rule section provides:
- **Pinned Element**: Highlights the element in the UI for easier identification.
- **Copy Selector**: A button to copy the CSS selector uniquely identifying the element.
- **Print to Console**: Logs the element reference to the browser's console for debugging. In Chrome-based browsers, you can right-click the logged element and select "Reveal in elements panel" to navigate directly to the live DOM.
-- **Share issue**: A button to copy markdown or plain text snippet to share the issue with your team or collaborators.
+- **Actions**: Share details of the accessibility problem or create a Jira issue (if the Jira integration is installed).
- **Solutions**: A list of potential solutions to address the issue.
+## Actions
+
+When you click on an element in the expanded Rule section, you can copy details of the accessibility violation to share, or directly create a Jira issue if you have the [Cypress Cloud Jira integration](/cloud/integrations/jira) installed.
+
+### Share issue
+
+The **Share issue** button allows you to copy a markdown or plain text snippet containing key details and related links for a particular accessibility violation. This makes it easy to share the issue with your team members or add it to tickets in your issue tracking system.
+
+
+
+The shared snippet includes:
+
+- The rule name and description
+- The element selector
+- Links back to the violation in Cypress Cloud
+- Context about the violation
+
+### Create Jira issue
+
+You can create Jira issues directly from accessibility violations in the detail view. This allows you to quickly track and prioritize accessibility issues within your existing Jira workflow.
+
+
+
+To create a Jira issue:
+
+1. Click on an element in the expanded Rule section to open the element details.
+2. Click the **Create Jira issue** button to open the Jira issue creation form.
+
+
+
+3. Complete the form by selecting the Jira project, issue type, assignee, and any additional fields required by your Jira configuration.
+4. Submit the form to create the issue in Jira.
+
+The created Jira issue will include a link back to the accessibility violation in Cypress Cloud, making it easy to navigate between your issue tracker and the detailed violation information.
+
+Additional context like related elements or comments for future triage can be added to the issue summary.
+
## Snapshots
Snapshots are fully hydrated HTML and CSS representations of your application's state during the test. Unlike screenshots or video, these snapshots allow you to:
@@ -53,4 +102,4 @@ Snapshots are fully hydrated HTML and CSS representations of your application's
This area also has the Test Replay button to provide access to any tests where this snapshot appeared, as well as the specific URL of the snapshot displayed at the bottom of the screen.
-It's also possible to cycle through the available snapshots to see all the states of the application that were captured, but this is usually not necessary. Think of snapshots more as examples and evidence relate to elements that are listed on the left hand side of the screen. The most useful way to go through the report is this way.
+It's also possible to cycle through the available snapshots to see all the states of the application that were captured, but this is usually not necessary. Think of snapshots more as examples and evidence related to elements that are listed on the left hand side of the screen. The most useful way to browse the report is to move through the elements on the left.
diff --git a/docs/accessibility/core-concepts/run-level-reports.mdx b/docs/accessibility/core-concepts/run-level-reports.mdx
index 8be03ada3f..3eac664f0f 100644
--- a/docs/accessibility/core-concepts/run-level-reports.mdx
+++ b/docs/accessibility/core-concepts/run-level-reports.mdx
@@ -85,7 +85,7 @@ Attributes for each rule include:
- **Inapplicable**: No applicable elements detected for this rule.
- **Ignored by config**: The rule was excluded at the project level.
- **Description**: A summary of the rule.
-- **Severity**: The Axe Core® severity level for the rule.
+- **Severity**: The Axe Core® impact level for the rule.
- **Counts**: The counts of failed, inconclusive, and ignored elements for the rule.
## Filtering
diff --git a/docs/accessibility/get-started/introduction.mdx b/docs/accessibility/get-started/introduction.mdx
index b257ab948a..4b0cd2f325 100644
--- a/docs/accessibility/get-started/introduction.mdx
+++ b/docs/accessibility/get-started/introduction.mdx
@@ -9,11 +9,11 @@ sidebar_position: 10
# Automated accessibility checks on every test
-Cypress Accessibility adds detailed accessibility checks and workflows in Cypress Cloud, with zero impact on test execution.
+Cypress Accessibility adds detailed accessibility checks to Cypress Cloud. Checks run against every step of every test, with zero impact on test execution.
-- Instantly visualize, triage, and fix accessibility violations without any additional code or configuration.
-- Dive deep into each violation with live, fully-rendered DOM snapshots of your application as it appeared during your tests.
-- Filter out the noise to explore only newly-introduced issues related to specific commits.
+- Visualize, triage, and fix accessibility violations without any additional code or configuration.
+- Debug each violation with interactive DOM snapshots from.
+- Filter to newly-introduced issues related to specific commits.
- Track your team's progress over time with historical scores to monitor improvements and identify regressions.
{
```
By examining the results and customizing your response, you gain maximum control over how to handle accessibility violations. Leverage CI environment context, such as tags, to fine-tune responses to specific accessibility outcomes.
+
+## Using Profiles for PR-specific configuration
+
+You can use [Profiles](/accessibility/configuration/profiles) to apply different configuration settings for pull request runs versus regression runs. This allows you to:
+
+- Use a narrow, focused configuration for PR runs that blocks merges based on critical accessibility issues
+- Maintain a broader configuration for regression runs that tracks all issues for long-term monitoring
+- Apply team-specific configurations when multiple teams share the same Cypress Cloud project
+
+For example, you might configure a profile named `aq-config-pr` that excludes non-critical pages and focuses only on the most important accessibility rules, while your base configuration includes all pages and rules for comprehensive regression tracking.
+
+```shell
+cypress run --record --tag "aq-config-pr"
+```
+
+This approach ensures that PR checks are fast and focused, while still maintaining comprehensive reporting for your full test suite.
+
+## Comparing against a baseline {#comparing-against-a-baseline}
+
+Comparing current results against a stored baseline allows you to detect only new violations that have been introduced, while ignoring existing known issues. This approach is more sophisticated than simply maintaining a list of known failing rules, as it tracks violations at the view level and can detect both regressions (new violations) and improvements (resolved violations).
+
+This is particularly useful in CI/CD pipelines where you want to fail builds only when new accessibility violations are introduced, allowing you to address existing issues incrementally without blocking deployments.
+
+### Baseline structure
+
+You can use any format you like as baseline for comparing reports. In the example code below we generate a baseline in a simplified format, which captures the state of accessibility violations from a specific run. The Results API handler code logs this for every run so that it can be easily copied as a new reference point.
+
+It includes:
+
+- **runNumber**: The run number used as the baseline reference
+- **severityLevels**: The severity levels to track (e.g., `['critical', 'serious', 'moderate', 'minor']`)
+- **views**: An object mapping view display names to arrays of failed rule names for that view
+
+```javascript
+{
+ "runNumber": "111",
+ "severityLevels": [
+ "critical",
+ "serious",
+ "moderate",
+ "minor"
+ ],
+ "views": {
+ "/": [
+ "aria-dialog-name",
+ "heading-order",
+ "scrollable-region-focusable"
+ ],
+ "/authorizations": [
+ "heading-order",
+ "listitem",
+ "region"
+ ]
+ }
+}
+```
+
+### Complete example
+
+The following example demonstrates how to compare current results against a baseline, detect new violations, identify resolved violations, and generate a new baseline when changes are detected.
+
+```javascript title="scripts/compareAccessibilityBaseline.js"
+require('dotenv').config()
+
+const { getAccessibilityResults } = require('@cypress/extract-cloud-results')
+const fs = require('fs')
+
+const TARGET_SEVERITY_LEVELS = ['critical', 'serious', 'moderate', 'minor']
+
+// Parse the run number from an accessibility report URL
+const parseRunNumber = (url) => {
+ return url.split('runs/')[1].split('/accessibility')[0]
+}
+
+// Define your baseline - beginning with no details
+// will list all current violations as "new", and log a
+// baseline that you can copy and save as your starting point
+
+const baseline = {
+ runNumber: '',
+ severityLevels: ['critical', 'serious', 'moderate', 'minor'],
+ views: {},
+}
+
+getAccessibilityResults().then((results) => {
+ // Create objects to store the results
+ const viewRules = {}
+ const viewsWithNewFailedRules = {}
+ const viewsWithMissingRules = {}
+
+ // Iterate through each view in current results
+ results.views.forEach((view) => {
+ const displayName = view.displayName
+ const ruleNames = view.rules.map((rule) => rule.name)
+
+ // Add to our results object
+ viewRules[displayName] = ruleNames
+
+ // Check for new failing rules
+ if (view.rules.length) {
+ view.rules.forEach((rule) => {
+ if (!TARGET_SEVERITY_LEVELS.includes(rule.severity)) {
+ return
+ }
+
+ // If the view exists in baseline and the rule is not in baseline's failed rules
+ if (!baseline.views?.[displayName]?.includes(rule.name)) {
+ if (viewsWithNewFailedRules[displayName]) {
+ viewsWithNewFailedRules[displayName].newFailedRules.push({
+ name: rule.name,
+ url: rule.accessibilityReportUrl,
+ })
+ } else {
+ viewsWithNewFailedRules[displayName] = {
+ newFailedRules: [
+ {
+ name: rule.name,
+ url: rule.accessibilityReportUrl,
+ },
+ ],
+ }
+ }
+ }
+ })
+ }
+ })
+
+ // Check for rules in baseline that are not in current results (resolved rules)
+ Object.entries(baseline.views).forEach(([displayName, baselineRules]) => {
+ const currentRules = viewRules[displayName] || []
+ const resolvedRules = baselineRules.filter(
+ (rule) => !currentRules.includes(rule)
+ )
+
+ if (resolvedRules.length > 0) {
+ viewsWithMissingRules[displayName] = { resolvedRules }
+ }
+ })
+
+ // Report any missing rules
+ const countOfViewsWithMissingRules = Object.keys(viewsWithMissingRules).length
+ const countOfViewsWithNewFailedRules = Object.keys(
+ viewsWithNewFailedRules
+ ).length
+
+ if (countOfViewsWithMissingRules || countOfViewsWithNewFailedRules) {
+ // Generate and log the new baseline values if there has been a change
+ const newBaseline = generateBaseline(results)
+ console.log('\nTo use this run as the new baseline, copy these values:')
+ console.log(JSON.stringify(newBaseline, null, 2))
+ fs.writeFileSync('new-baseline.json', JSON.stringify(newBaseline, null, 2))
+ }
+
+ if (countOfViewsWithMissingRules) {
+ console.log(
+ '\nThe following Views had rules in the baseline that are no longer failing. This may be due to improvements in these rules, or because you did not run as many tests in this run as the baseline run:'
+ )
+ console.dir(viewsWithMissingRules, { depth: 3 })
+ } else if (!countOfViewsWithNewFailedRules) {
+ console.log(
+ '\nNo new or resolved rules were detected. All violations match the baseline.\n'
+ )
+ }
+
+ if (countOfViewsWithNewFailedRules) {
+ // Report any new failing rules
+ console.error(
+ '\nThe following Views had rules violated that were previously passing:'
+ )
+ console.dir(viewsWithNewFailedRules, { depth: 3 })
+ throw new Error(
+ `${countOfViewsWithNewFailedRules} Views contained new failing accessibility rules.`
+ )
+ }
+
+ return viewRules
+})
+
+function generateBaseline(results) {
+ try {
+ // Create an object to store the results
+ const viewRules = {}
+
+ // Iterate through each view
+ results.views.forEach((view) => {
+ // Get the displayName and extract the rule names
+ const displayName = view.displayName
+ const ruleNames = view.rules
+ .filter((rule) => TARGET_SEVERITY_LEVELS.includes(rule.severity))
+ .map((rule) => rule.name)
+
+ // Add to our results object
+ viewRules[displayName] = ruleNames
+ })
+
+ const runNumber = parseRunNumber(results.views[0].accessibilityReportUrl)
+
+ return {
+ runNumber,
+ severityLevels: TARGET_SEVERITY_LEVELS,
+ views: viewRules,
+ }
+ } catch (error) {
+ console.error('Error parsing accessibility results:', error)
+ return null
+ }
+}
+```
+
+### Key concepts in the example script
+
+#### New failing rules
+
+A **new failing rule** is a rule that has violations on a View in the current run that were not present in the baseline. These represent regressions that need to be addressed. The script will fail the build if any new failing rules are detected.
+
+#### Resolved rules
+
+A **resolved rule** is a rule that was present in the baseline but no longer has violations in the current run. These represent improvements in accessibility. The script reports these but does not fail the build, allowing you to track progress, and printing out an updated baseline to copy over when things are fixed.
+
+#### Severity filtering
+
+The baseline comparison only tracks rules at the severity levels you specify in `TARGET_SEVERITY_LEVELS`. This allows you to focus on the severity levels that matter most to your team. Rules at other severity levels are ignored during comparison.
+
+#### View-level comparison
+
+Violations are tracked per view (URL pattern or component), allowing you to see exactly which pages or components have regressed or improved. This granular tracking makes it easier to identify the source of changes and assign fixes to the appropriate teams.
+
+### Best practices
+
+#### When to update the baseline
+
+Update your baseline when:
+
+- You've fixed accessibility violations and want to prevent regressions
+- You've accepted certain violations as known issues that won't block deployments
+
+We recommend storing the baseline in version control so it's versioned alongside your code and accessible in CI environments, but some users prefer updating the baseline automatically based on the newest results from a full passing test run on the main branch of the project. This means any PRs will be compared against the reference run that makes sense at the time the results are analyzed, and avoids needing to manually own the standard.
+
+#### Handling partial reports
+
+If a run is cancelled or incomplete, the Results API may return a partial report. Consider checking `summary.isPartialReport` before comparing against the baseline, as partial reports may not include all views and could produce false positives.
+
+#### Managing baseline across branches
+
+You may want different baselines for different branches (e.g., `main` vs feature branches). Consider storing baselines in branch-specific files or using environment variables to specify which baseline to use.
+
+#### Storing the baseline
+
+Common approaches for storing baselines:
+
+- **Version control**: Commit the baseline JSON file to your repository
+- **CI artifacts**: Store baselines as build artifacts that can be retrieved in subsequent runs
diff --git a/docs/accessibility/guides/maintain-accessibility.mdx b/docs/accessibility/guides/maintain-accessibility.mdx
index d91ff5baab..57ee5bb370 100644
--- a/docs/accessibility/guides/maintain-accessibility.mdx
+++ b/docs/accessibility/guides/maintain-accessibility.mdx
@@ -9,7 +9,7 @@ sidebar_position: 30
# Maintain accessibility
-Accessibility isn't a one-time project—it's a continuous process. This guide explains how to transition from addressing known issues to maintaining long-term accessibility in your projects.
+Accessibility is never a one-time project that can be completed in a certain timeframe and considered done. For an actively developed application, accessibility is a continuous process like all other aspects of quality. This guide explains how to transition from addressing known issues to maintaining long-term accessibility in your projects.
## Switching from "improving" to "maintaining"
@@ -20,6 +20,8 @@ When a specific accessibility rule reaches zero violations for a page, component
Your ultimate goal is to achieve a fully passing state across all rules. Cypress provides you a lot of flexibility to manage large amounts of accessibility violations and make incremental progress towards well-defined targets. Through a combination of fixing accessibility problems, and configuring Cypress to focus on a tight scope of rules, standards, and application areas that matter most to you, you might be closer than you think to a "clean" main branch, from which you can expand your standards over time.
+You can also use [Configuration Profiles](/accessibility/configuration/profiles) to manage different standards for different run types, such as stricter requirements for pull requests versus comprehensive monitoring for regression runs.
+
## Maintaining accessibility standards
A clean report marks a pivotal change in your workflow. Instead of working through backlogs, the focus shifts to preventing accessibility issues from merging into the main branch.
diff --git a/docs/accessibility/results-api.mdx b/docs/accessibility/results-api.mdx
index c230ac672c..d65d123685 100644
--- a/docs/accessibility/results-api.mdx
+++ b/docs/accessibility/results-api.mdx
@@ -257,6 +257,10 @@ The Accessibility results for the run are returned as an object containing the f
}
```
+## Comparing against a baseline
+
+For comprehensive examples of comparing results against a baseline, including complete code examples, baseline structure, and best practices, see the [Block pull requests and set policies](/accessibility/guides/block-pull-requests#comparing-against-a-baseline) guide.
+
### **2. Add to CI Workflow**
In your CI workflow that runs your Cypress tests,
@@ -269,7 +273,7 @@ In your CI workflow that runs your Cypress tests,
If you record multiple runs in a single CI build, you must record these runs using the `--tag` parameter and then call `getAccessibilityResults` with the `runTags` argument for each run.
-This is necessary to identify each unique run and return a corresponding set of results. The tags are how each run is uniquely identified.
+This is necessary to identify each unique run and return a corresponding set of results. The tags are how each run is uniquely identified. Tags can also be used to activate [Profiles](/accessibility/configuration/profiles) that apply different configuration settings to your runs.
**Example**
diff --git a/docs/app/references/command-line.mdx b/docs/app/references/command-line.mdx
index 68c073654e..7b48352031 100644
--- a/docs/app/references/command-line.mdx
+++ b/docs/app/references/command-line.mdx
@@ -594,6 +594,11 @@ Cypress Cloud will display any tags sent with the appropriate run.
alt="Cypress run in Cypress Cloud displaying flags"
/>
+:::info
+
+**App Quality Profiles**: If you use Cypress Cloud's [accessibility](/accessibility/get-started/introduction) and [UI Coverage reporting](/accessibility/get-started/introduction), a run tag can be mapped to [App Quality Profiles](/accessibility/configuration/profiles) to automatically apply different configuration settings for different types of runs.
+:::
+
#### Exit code
Cypress supports two different exit code behaviors. The default behavior is similar to that of Mocha, but is not POSIX compliant: reserved exit codes can be returned for certain conditions. As well, the default behavior
diff --git a/docs/partials/_attributefilters.mdx b/docs/partials/_attributefilters.mdx
index 91474d0613..b601c11b2e 100644
--- a/docs/partials/_attributefilters.mdx
+++ b/docs/partials/_attributefilters.mdx
@@ -1,4 +1,4 @@
-Some attributes used for identification may be auto-generated, dynamic, or unrepresentative, leading to inaccurate identification or grouping. The `attributeFilters` configuration property allows you to **exclude** specific attributes or patterns that should not be used for these purposes.
+Some attributes used for identification may be auto-generated, dynamic, or state-based, leading to inaccurate identification or grouping. The `attributeFilters` configuration property allows you to **exclude** specific attributes or patterns that should not be used for these purposes.
By using `attributeFilters`, you can ensure Cypress selects more appropriate identifiers, leading to cleaner and more accurate reports, with better element de-deduplication across distinct states of the application being tested.
@@ -6,7 +6,7 @@ By using `attributeFilters`, you can ensure Cypress selects more appropriate ide
- **Handling library-specific attributes**: Attributes generated by libraries may not represent the element's purpose and should be ignored.
- **Improving grouping accuracy**: By filtering out irrelevant attributes, you ensure similar elements are grouped correctly.
-- **Streamlining reports**: Eliminating noisy attributes reduces clutter in Cypress Accessibility or UI Coverage reports, making them easier to interpret and act upon.
+- **Avoiding state-based duplication**: Classes like `link--focused` can clutter report findings.
## Scope
@@ -24,7 +24,8 @@ supported, if you need to split them up.
{
"attribute": string,
"value": string,
- "include": boolean
+ "include": boolean,
+ "comment": string
}
]
}
@@ -32,29 +33,34 @@ supported, if you need to split them up.
### Options
-For every attribute that an element has, the first `attributeFilters` rule for which the `attribute` property matches the attribute's name and the `value` property matches the attribute's value, the `include` value is used to determine whether or not the attribute will be used for element identification and grouping. Attributes that do not match any rules are included by default.
+Whether Cypress is allowed to use a certain attribute to identify an element when processing it for UI Coverage or Cypress Accessibility reports will be controlled by the **first** filter that matches the name and value of that attribute.
+
+This means that catch-all rules can be added at the bottom of the list by setting `include` to `false`, and exceptions can be defined earlier in the list using `include: true`. For example, you could avoid all use of `aria-label` for identification of elements as a catch-call filter, but then define exceptions for certain values it may have where it is a good identifier.
+
+Attributes that do not match any rules are included by default and used if needed, so `include: true` is only required for defining exceptions. If you want to make sure an attribute is preferred as an identifier when available, add it to your [attributeFilters](/accessibility/configuration/attributefilters).
| Option | Required | Default | Description |
| ----------- | -------- | ------- | ---------------------------------------------------------------------- |
| `attribute` | Required | | A regex string to match attribute names |
| `value` | Optional | `.*` | A regex string to match attribute values |
| `include` | Optional | `true` | A boolean to specify whether the matched attribute should be included. |
+| `comment` | Optional | | A comment describing the purpose of this filter rule. |
## Examples
-### Excluding common auto-generated id values
+### Excluding common auto-generated ID values
+
+Some component libraries generate
```json
{
- "uiCoverage": {
- "attributeFilters": [
- {
- "attribute": "id",
- "value": ":r.*:",
- "include": false
- }
- ]
- }
+ "attributeFilters": [
+ {
+ "attribute": "id",
+ "value": ":r.*",
+ "include": false
+ }
+ ]
}
```
@@ -67,7 +73,7 @@ For every attribute that an element has, the first `attributeFilters` rule for w