User Rating 0.0
Total Usage 0 times
Input HTML
Accessible HTML Output
Run the converter to see the accessibility report.
Is this tool helpful?

Your feedback helps us improve.

About

Approximately 96% of home pages have detectable WCAG 2.1 failures. Missing form labels, unassociated table headers, absent ARIA landmarks, and elements only reachable by mouse exclude users who rely on assistive technology. Manual remediation across a full codebase consumes hours and introduces human error. This converter parses raw HTML through a rule-based engine that detects 12 categories of accessibility deficiencies and applies deterministic fixes: associating label elements with inputs via generated id attributes, injecting scope and headers on table cells, adding role and tabindex to interactive elements lacking keyboard access, and enforcing lang attributes at the document root. The tool approximates conformance improvements assuming well-structured source markup. Malformed nesting or JavaScript-generated DOM nodes fall outside static analysis scope.

html accessibility wcag converter aria fixer accessible html a11y tool html validator screen reader keyboard accessibility

Formulas

The converter applies a deterministic rule pipeline. Each rule Ri is a function that traverses the parsed DOM tree T and returns a set of issues Ii along with a mutation function Mi.

T = Mn Mn1 M1(T)

where T is the input DOM tree, Mi is the mutation for rule i, and T is the accessible output tree.

ID generation uses a collision-free scheme:

id = concat("hac-", tagName, "-", counter)

where counter is a monotonically increasing integer scoped to the conversion session, and tagName is the lowercase element name. The label association rule checks:

isOrphan(input) = ¬hasExplicitLabel(input) ¬hasImplicitLabel(input) ¬hasAriaLabel(input)

where hasExplicitLabel checks for a label[for] matching the input's id, hasImplicitLabel checks if the input is wrapped inside a label element, and hasAriaLabel checks for aria-label or aria-labelledby attributes.

Reference Data

Rule IDWCAG CriterionLevelIssue DetectedAuto-Fix Applied
R011.1.1 Non-text ContentAimg missing altAdds alt=""
R021.3.1 Info and RelationshipsAinput without associated labelGenerates id, links label[for]
R031.3.1 Info and RelationshipsAth missing scopeAdds scope="col" or scope="row"
R041.3.1 Info and RelationshipsAtd without headersLinks headers to th ids
R052.1.1 KeyboardAonclick without tabindexAdds tabindex="0" and role="button"
R062.4.1 Bypass BlocksANo skip navigation linkInserts skip-to-main link
R072.4.6 Headings and LabelsAAHeading hierarchy skippedReports warning (no auto-fix)
R083.1.1 Language of PageAhtml missing langAdds lang="en"
R094.1.2 Name, Role, ValueALandmark elements missing roleAdds appropriate ARIA role
R104.1.2 Name, Role, ValueArequired without aria-requiredAdds aria-required="true"
R112.4.4 Link PurposeAtarget="_blank" without indicationAdds rel="noopener noreferrer" and sr-only text
R121.3.1 Info and RelationshipsAfieldset without legendReports warning (no auto-fix)
R134.1.1 ParsingADuplicate id attributesAppends unique suffix
R142.4.2 Page TitledAMissing title elementInserts placeholder title
R151.3.5 Identify Input PurposeAAInput missing autocompleteSuggests autocomplete value

Frequently Asked Questions

No. The HTML is parsed via the browser's DOMParser API, which creates an inert document. Script elements are present in the parsed tree but never executed. No event handlers fire. This makes the tool safe for analyzing untrusted markup. However, any DOM nodes generated by JavaScript at runtime in the original page will not exist in the static HTML you paste, so those nodes cannot be analyzed.
Some older assistive technologies and browser combinations do not fully map implicit ARIA roles from HTML5 landmark elements. Adding explicit role="navigation" to <nav> or role="main" to <main> provides a redundant fallback that costs nothing in modern browsers but ensures coverage on legacy screen readers. This practice aligns with WCAG 2.1 Technique ARIA11. You can disable this rule if your target environment only includes modern user agents.
The converter identifies <th> elements in the first row and first column of each <table>. It assigns scope="col" to header cells in <thead> and scope="row" to first-column headers. For complex tables with colspan or rowspan, it generates unique id values for each <th> and builds headers attribute strings on each <td> referencing the relevant column and row header ids. Tables nested more than 2 levels deep are flagged for manual review.
The converter only adds attributes; it does not remove or modify existing ones except when resolving duplicate id values. Added attributes include role, tabindex, aria-required, alt, scope, headers, lang, and rel. If your JavaScript selects elements by id and a duplicate id is suffixed, that reference may break. The issue report flags every such change so you can update selectors accordingly.
No. Automated tools catch roughly 30% to 40% of WCAG issues. Color contrast, meaningful alt text content, logical reading order, and cognitive clarity require human judgment. This tool handles structural and attribute-level fixes. You must still manually verify color contrast ratios (minimum 4.5:1 for normal text), provide descriptive alt text where the tool inserts empty placeholders, and test with actual screen readers like NVDA or VoiceOver.
The tool detects whether the input contains an <html> root element. If not, it treats the input as a fragment and wraps it in a minimal document structure for analysis. Rules that target document-level elements (like lang on <html> or <title>) are skipped for fragments. The output preserves only your fragment without the wrapper. This is indicated in the issue report.