# Accessibility Violations

A violation is an [accessibility guideline](/testing/accessibility) violated by a scenario, such as a tap target below the minimum size or a button without a label.
`testWidgetbook` evaluates the guidelines for every scenario and uploads the result with the build.

In a pull request, Widgetbook Cloud compares the violations of a scenario between the `base` and the `head` build.

## Reading Violations

The **Accessibility Violations** section sits below the visual comparison on a scenario's diff.

<Image src="/assets/cloud/accessibility/scenario-diff-accessibility.png" caption="Accessibility changes and violations on a scenario diff" zoom />

Violations of a scenario are grouped by how they compare to the `base` build:

| Group            | Meaning                                                   |
| ---------------- | --------------------------------------------------------- |
| **New**          | Introduced by the pull request. Shown first and expanded. |
| **Pre-existing** | Present in both builds. Collapsed behind an expander.     |
| **Resolved**     | Present in the `base` build and fixed by the pull request. |

Each violation shows a severity, the guideline that failed, a message with the specifics such as `Expected at least 48×48, found 358×24`, and a link to that guideline's documentation.

A violation is identified by its guideline and the set of elements that violated it, independent of their position and the measured values.
A tap target that moved, or that grew but is still too small, stays the same violation instead of showing up as one resolved plus one new.
Fixing one element out of several changes the set, so the violation is reported as resolved and a new one is raised for the elements that remain.

A scenario joins the pull request's change set when it introduces or resolves a violation, even when the screenshot and the semantics tree are unchanged.

## Configuring Guidelines

Which guidelines run is configured in your Widgetbook project, not in Widgetbook Cloud.
See [Accessibility Guidelines](/testing/accessibility) for the default set and for writing your own.

```dart title="widgetbook/lib/widgetbook.config.dart"
final config = Config(
  // ...
  accessibilityConfig: AccessibilityConfig(
    guidelines: WidgetbookGuidelines.recommended,
  ),
);
```
