Installation
composer require --dev elao/accesseo:^1.0@beta
Add to config/bundles.php:
Elao\Bundle\Accesseo\ElaoAccesseoBundle::class => ['dev' => true],
First Use Case
/_profiler/) in your dev environment.Where to Look First
config/packages/elao_accesseo.yaml for customization.Integrating with CI/CD
phpunit.xml to fail builds if accessibility/SEO issues exceed a threshold:
<env name="ACCESSEO_THRESHOLD" value="5"/>
Customizing Insights
use Elao\Bundle\Accesseo\Panel\AccessibilityPanel;
use Elao\Bundle\Accesseo\Panel\SeoPanel;
// In a custom bundle's ProfilerSubscriber
public function onCollect(ProfilerSectionEvent $event) {
$event->getPanel()->add(AccessibilityPanel::createFromRequest($event->getRequest()));
$event->getPanel()->add(SeoPanel::createFromRequest($event->getRequest()));
}
Icon Readability Checks
elao_accesseo.yaml:
elao_accesseo:
icons:
- fa-icon
- custom-icon
alt text for screen readers.Disabling Panels Selectively
elao_accesseo:
enabled_seo_panel: false
enabled_accessibility_panel: true
alt, aria-*) via static analysis.Profiler Overhead
enabled: true in bundles.php).False Positives in Accessibility
aria-hidden="true" may trigger false alerts.aria-hidden manually.SEO Panel Limitations
php bin/console cache:clear) if insights don’t update.{% block meta %} for consistent SEO audits.Beta Package Quirks
Blank Profiler Tab?
ElaoAccesseoBundle is enabled in bundles.php.elao_accesseo.yaml for syntax errors (YAML is strict).Missing Icons in Accessibility
SEO Issues Not Updating
php bin/console cache:clear
symfony-server-start
Custom Insights
PerformancePanel) that reuses Accesseo’s data structure:
namespace App\Panel;
use Elao\Bundle\Accesseo\Panel\AbstractPanel;
class CustomPanel extends AbstractPanel {
protected function getInsights() {
return [
'custom_metric' => $this->getCustomValue(),
];
}
}
Hook into Data Collection
AccesseoCollector service to inject custom logic:
# config/services.yaml
Elao\Bundle\Accesseo\Collector\AccesseoCollector:
tags: [data_collector]
arguments:
$customService: '@app.custom_service'
Export Insights
$collector = $container->get('elao_accesseo.collector');
$insights = $collector->collect($request);
file_put_contents('accesseo_report.json', json_encode($insights));
How can I help you explore Laravel packages today?