AWS Builder Center
AccessLens AI: Civic Accessibility Auditing with Strands Decider 2B

AccessLens AI: Civic Accessibility Auditing with Strands Decider 2B

AccessLens AI combines Playwright, axe-core 4.13.0, and Strands Decider 2B to audit civic websites and prioritize accessibility findings. A policy gate uses confidence and severity thresholds to distinguish advisory remediation from human review, while Amazon Bedrock provides explanations without directly modifying public websites.

Making Civic Websites More Accessible with AccessLens AI

The problem: finding issues is only the beginning

Public-facing civic websites help people access essential information and services. Residents may rely on them to find public notices, understand local services, complete forms, or navigate government resources. When these websites have accessibility barriers, some users may struggle to access information independently.
Automated accessibility tools can identify many potential problems, but a list of violations alone does not tell an auditor what to do next. Findings can vary in severity, confidence, and remediation complexity. Automatically applying a code change based on an uncertain finding can introduce new problems or alter a public website in unintended ways.
AccessLens AI: Civic Access Auditor addresses this gap by combining automated accessibility testing with policy-governed decision-making. Instead of treating every finding as an instruction to make an automatic change, the system evaluates the evidence and routes findings toward an appropriate next step.

What AccessLens AI does

AccessLens AI is an open-source application built with FastAPI, Playwright, axe-core, SQLite, and Strands Decider 2B. It provides a workflow for scanning public-facing websites, examining accessibility findings, reviewing decision results, and retaining scan history.
The application follows four main stages:
  1. Scan: Playwright loads a target website in a browser so accessibility checks can run against the rendered page.
  1. Detect: axe-core identifies accessibility violations and provides supporting information about affected elements and relevant rules.
  1. Evaluate: Strands Decider 2B evaluates the finding through a reusable policy-based decision pattern.
  1. Review: AccessLens AI presents the result, supporting evidence, and remediation guidance. Uncertain or high-risk cases can be routed to human review.
This separation matters. Detecting a potential issue and deciding what action is safe are different tasks.
Architecture diagram: AccessLens AI workflow
Architecture diagram showing AccessLens AI's workflow: Playwright scans civic websites, axe-core detects accessibility violations, Strands Decider 2B evaluates policy and risk, and a review dashboard presents decisions. Amazon Bedrock provides advisory explanations without overriding the policy gate.

The diagram above illustrates how scanning, detection, policy evaluation, and review work together, with Amazon Bedrock providing advisory explanations rather than overriding the policy gate.

A policy gate, not blind automation

The core design principle is that automated detection should not automatically authorize remediation. AccessLens AI uses a reusable decision pattern to determine how a finding should proceed.
The decision outcomes are:
  • AUTO_FIX_CANDIDATE: A finding may qualify for a carefully controlled remediation workflow when the evidence and policy requirements support it.
  • EXPLAIN_ONLY: The system can provide an explanation or suggested remediation without authorizing a change.
  • HUMAN_REVIEW: A person should inspect the finding when confidence is insufficient or the risk requires additional judgment.
AccessLens AI applies a 70% confidence floor and a stricter 85% policy threshold for critical issues. These are application policy settings, not universal accessibility standards. A finding that does not meet the required threshold should not be treated as an approved automatic fix.
The decision pattern makes the reasoning explicit: assess the evidence, evaluate confidence and risk, apply policy, and choose the permitted next step. This pattern can also inform other systems that need a safety gate before performing potentially consequential actions.

Why Strands Decider 2B?

Strands Decider 2B is used as the decision component in the workflow. It evaluates findings against configured criteria rather than allowing a generative explanation to make the final authorization decision.
For example, a finding may identify an accessibility issue but still lack sufficient confidence for automated action. In that situation, the system can route the case to human review instead of assuming that a suggested fix is safe.
This distinction is especially important for civic websites, where changing production content or behavior without authorization would be inappropriate. AccessLens AI is designed to support auditing and remediation decisions, not to silently modify live public websites.

Amazon Bedrock provides advisory explanations

AccessLens AI can use Amazon Bedrock to generate contextual explanations and remediation suggestions. The explanation layer helps an auditor understand why a finding matters and what a potential correction could look like.
However, an explanation is not an authorization. Bedrock's suggested remediation does not override the Strands Decider policy gate. The policy result determines whether the workflow can proceed or must remain advisory or require human review.
In a representative application-level test, Strands Decider 2B returned  HUMAN_REVIEW  with 19.41% confidence for a critical image alternative-text finding. The result was below the application's 70% confidence floor, so automatic patching remained locked. During a separate live integration check, the Amazon Bedrock inference request failed because the configured model identifier was invalid. The application therefore provided deterministic WCAG-related guidance as a fallback rather than presenting it as a successful Bedrock-generated response. No live website code was changed.
This illustrates the intended behavior: uncertainty leads to review, not an automatic intervention.

Example: Auditing a Public Website

During a live audit of a public-facing website, AccessLens AI identified a serious color-contrast violation affecting four elements. Insufficient contrast can make text harder to read for users with visual impairments.
The audit reported four affected elements, 41 passed axe-core rules, and one incomplete check requiring manual review. Strands Decider 2B classified the finding as high risk and returned  HUMAN_REVIEW  with 65% confidence—below the application's configured 70% confidence threshold.
The Amazon Bedrock inference request failed because the configured model identifier was invalid. Instead of presenting an unverified AI-generated response, the application provided deterministic WCAG-related remediation guidance as a fallback. The guidance remained advisory, and no changes were automatically applied to the audited website.
This example demonstrates the workflow: detect an accessibility concern, inspect the evidence, apply the decision policy, and preserve human oversight when a finding is high risk or requires further investigation. It also illustrates why AI integration failures must be handled transparently rather than represented as successful model-generated guidance.

Security and auditability

An auditing tool must also handle its inputs carefully. AccessLens AI includes protections intended to reduce the risk of server-side request forgery (SSRF) when processing target URLs. These controls are important because a URL supplied for auditing should not become an unrestricted route to internal services or private network resources.
The application also stores scan history in SQLite, helping users revisit previous results. The history and supporting finding details make it easier to inspect what the system detected and how a decision was handled.
AccessLens AI is designed around evidence, policy, and review. It does not claim that automated scans replace manual accessibility testing, and it does not treat every automated result as conclusive. Auditors should still verify findings and test proposed corrections with appropriate assistive technologies and manual procedures.

Testing and implementation

The project uses automated tests to verify important application behavior, including decision handling and security-related logic. At the latest verification, the offline test suite passed 87 tests, with 1 test skipped. These tests provide a repeatable baseline for the core application without requiring live AWS calls during ordinary testing.
Amazon Bedrock integration has been tested at the application level. However, live inference should be considered verified only when a real Bedrock request completes successfully. The observed latency from a single test is an example result, not a performance benchmark.
For a clean setup, the application defaults to a disabled AI provider unless an operator configures an appropriate provider and credentials. This helps keep routine local development and offline testing predictable.

What comes next?

Potential next steps include adding automated accessibility scanning for civic PDF documents, expanding the available civic-site test fixtures, and evaluating AWS AgentCore Runtime as a possible future deployment option.
Further work can also explore broader accessibility test coverage and more systematic evaluation of decision confidence. The goal is not to eliminate human judgment, but to direct attention toward findings where it is most valuable.

Conclusion

AccessLens AI combines browser-based accessibility testing with a policy-governed decision workflow. Playwright and axe-core identify potential barriers, Strands Decider 2B evaluates the appropriate next step, and Amazon Bedrock can provide advisory explanations without bypassing the policy gate.
The central idea is simple: detect issues automatically, authorize actions carefully, and keep uncertain or high-risk remediation under human review. For civic accessibility auditing, that separation makes the workflow more transparent and safer to operate.

Project Links

The source code, deployed application, and demonstration are provided to help readers explore the implementation and understand the accessibility auditing workflow.

Acknowledgements: AWS User Group Madurai and the Hackathon Kit

I would like to thank AWS User Group Madurai for providing access to the hosted Strands Decider 2B model and the Strands Decider hackathon kit.
The hosted Decider 2B model helped me implement and test the decision layer in AccessLens AI. It evaluates accessibility findings against the application's decision policy and helps route uncertain or high-risk cases to human review. When classification confidence falls below the configured 70% threshold, automated remediation remains locked.
The hackathon kit provided a starting point for exploring policy-based decisions, model routing, and guardrails. I built on that approach to create a civic accessibility auditing workflow that combines browser-based testing, evidence-driven findings, and human oversight.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article