Accessibility Addon

The Accessibility Addon helps detect accessibility issues using the accessibility_tools package.

Due to maintenance issues, the AccessibilityAddon will no longer be shipped with future Widgetbook versions. The addon is deprecated and you can use the setup guide below to use it again in your app.

Setup

  1. Add accessibility_tools to your pubspec.yaml file:

    pubspec.yaml
    dependencies:
      accessibility_tools:
    
  2. Create a new file called accessibility_addon.dart in your widgetbook_workspace project, with the following content:

    addons/accessibility_addon.dart
    import 'package:accessibility_tools/accessibility_tools.dart';
    import 'package:widgetbook/widgetbook.dart';
    
    class AccessibilityAddon extends BuilderAddon {
      AccessibilityAddon()
          : super(
              name: 'Accessibility',
              builder: (context, child) => AccessibilityTools(
                child: child,
              ),
            );
    }
    
  3. Start using the addon as follows:

    Widgetbook.material(
      addons: [
        AccessibilityAddon(),
        // ...
      ],
    );