EAA · EN 301 549 · WCAG 2.1 AA

Accessibility law reaches the interface you render, not the form your code takes.

The European Accessibility Act does not contain the word obfuscation, and no reading of it makes a build transformation into a compliance question. What it does reach is the experience a user with a disability actually gets. Almost everything a JavaScript protector does is invisible to that experience. Two runtime defence options are not, and one of them is misunderstood as a mouse setting when it is really a keyboard one.

The Short Version

Transforms are silent · Two options are not · Test the real artifact

Three findings carry nearly all the practical weight, and only one of them is about the law.

Renaming cannot reach the DOMRoles, names, focus order and contrast are produced by behaviour the transforms preserve.
Right-click blocking is a keyboard issueThe same event fires for the context-menu key and Shift with F10.
Integrity guards fight assistive toolsBoth wrap the same built-ins, and the guard cannot tell them apart.
Why This Page Exists

A law about outcomes, arriving at a team that ships a build artifact

Directive (EU) 2019/882 is written in the language of outcomes. It describes what a product or service has to achieve for people with disabilities, leaves the technical means to harmonised standards, and is enforced through the implementing law of each member state with effect from 28 June 2025. Nothing in that structure has an opinion about how your JavaScript is written. Yet the question reaches engineering teams in a mangled form, usually as a request to confirm that protecting the bundle will not create an accessibility problem, and occasionally as a suggestion that obfuscated code is somehow inherently inaccessible. The first question deserves a precise answer, the second is simply wrong, and both are worth resolving before an audit rather than during one.

Conformance attaches to the rendered result

Success criteria are evaluated against what reaches the user: elements, roles, accessible names, focus order, contrast, announced state. None of those are properties of your source text, so none of them are changed by rewriting it.

Readable source was never the mechanism

Assistive technology consumes the accessibility tree the browser builds, not your JavaScript. A screen reader has no more use for your variable names than it has for your indentation style.

Two options do change the outcome

Runtime defence is a different category from the code transforms. Two of its options alter how the page responds to input and to other software on the machine, and both are configurable.

Scope

Work out which situation you are in before designing around it

The directive lists categories of products and services rather than industries, and teams are frequently asked to comply without being told which category applies. The answer changes what you owe and when. Settle this with counsel first, because the engineering work below is identical either way and is worth doing regardless.

You sell to consumers through a browser

Electronic commerce is explicitly in scope, which pulls in the checkout, the account area and any interactive component you embed. This is the most common way a front-end team ends up on this page, and it is also the case where a payment or ticketing widget you did not write becomes part of your assessed surface.

You provide banking, communications or transport services

Consumer banking, electronic communications, and transport websites and applications are named categories. These are also the sectors where runtime defence is most likely to be switched on for good reasons, which makes the option review below the important part of the work.

You publish e-books or ship dedicated software

E-books and their reading software are in scope, as is the software running self-service terminals. Terminal software is the case where a locked-down kiosk build and an accessibility duty meet directly, and where the context-menu question stops being theoretical.

You supply a component to somebody who is in scope

You may carry no direct duty and still be asked to evidence one, because your customer does. Suppliers of widgets, players and embedded SDKs are increasingly asked for a conformance report, and the settings you ship by default become their problem.

The Three Points of Contact

Where a JavaScript protection pipeline actually meets accessibility

Out of the whole standard, three things are influenced by how you protect browser code. Everything else — colour contrast, heading structure, form labelling, captions, reading order, error identification — is decided in your markup, your styles and your component library, and no build setting affects any of it in either direction.

1. Suppressed input, which is the real one

The developer-tools key blocking option registers a listener that cancels every context-menu event on the page. That event is not exclusive to a mouse: the dedicated context-menu key produces it, and so does the Shift and F10 combination. Cancelling it unconditionally removes a keyboard-reachable route to browser features people rely on, including reading, translation and text selection helpers. If one thing on this page ends up in your audit notes, it should be this.

2. Integrity guards versus assistive software

The anti-monkey-patching option fingerprints a list of built-in functions at startup and re-checks them periodically. Its default watch list includes the prototype method used to register event listeners, the timer functions, the network functions and the storage methods. Accessibility overlays and assistive extensions work by wrapping exactly those. The guard is doing its job and still reaching the wrong conclusion, because a helper and an attacker perform the same operation.

3. Timing, which is usually a non-event

Heavier transforms add work at startup. This only becomes an accessibility question when it is severe enough to delay the first meaningful render or to make an interaction miss a timing expectation. It is worth measuring once on a representative device rather than assuming in either direction, and in practice it is the least likely of the three to matter.

And the one that only looks like a contact point

Renaming identifiers is routinely raised as a risk and is not one. Accessible names come from text content, labels and ARIA attributes in the document; they are not derived from the names of the variables that produced them. The only related thing to watch is any code that reads its own function names at run time, which is a fragility worth removing for reasons that predate this discussion.

The Tension Worth Naming

Hardening the page and welcoming other software are opposite instincts

Leaving this out would make the page a brochure. Runtime defence exists on the premise that other code running in the page is hostile until proven otherwise. Accessibility rests on the opposite premise: that the user is entitled to bring their own software, that it will modify the page, and that your job is to stay out of its way. Both premises are defensible and they collide in exactly one place, so the useful move is to decide the collision deliberately rather than discover it from a complaint.

The user's software is not an attacker

A screen reader, a magnifier, a switch-access driver and a reading extension all modify page behaviour. Any control that treats modification as evidence of tampering will eventually fire on one of them, and a false positive here lands on the user least able to work around it.

Exclusion beats disablement

The integrity option accepts a list of dotted paths to leave out of its check, so the reasonable configuration removes the specific globals assistive tooling wraps and keeps the rest of the watch list active. Switching the whole feature off is a bigger concession than the problem requires.

Blocking keys buys very little

Suppressing function keys and the context menu does not prevent inspection; the developer tools open from a menu, and the source is already on the machine. Weigh a control with a real accessibility cost and a marginal security benefit accordingly.

A Workable Order

The arrangement that removes the judgement call

The sequence below is the whole engineering answer. It costs one pipeline change and it converts an open-ended worry into a test that either passes or does not.

Audit the artifact you ship

Point your automated accessibility checks at the protected production build rather than the development server. Runtime defence is typically inert in development, so a green pipeline can be testing a configuration no user ever receives.

Add a manual keyboard pass

Automated scanners do not notice that a context menu no longer opens. Tab through the interface, press the context-menu key, try Shift with F10, and confirm the result matches an unprotected build.

Run one assistive tool for real

If the integrity guard is enabled, load the protected build with a screen reader or an assistive extension active and leave it running past the heartbeat interval. This is the only reliable way to see the collision before a user does.

Record the decision

Note which options are enabled and why, alongside the accessibility test evidence. If you later publish an accessibility statement, you will already have the reasoning rather than reconstructing it under time pressure.

Honest Limits

What we will not claim

The compliance pages on this site are useful only to the extent they refuse to oversell, so here is the boundary in plain terms.

“Obfuscation supports accessibility conformance”

It does not, in either direction. There is no success criterion it helps you meet. The most that can honestly be said is that the code transformations are neutral, and that two runtime options need review.

“Our tool makes your service compliant”

No build tool can. Conformance is a property of your interface, assessed against a standard, in a legal context specific to your member state and your service category.

“This page tells you your obligations”

It does not, and it is not written by lawyers. Scope, exemptions and the disproportionate-burden assessment are decided under your national implementing law. Confirm all of it with your counsel.

“An automated scan proves conformance”

Automated tooling catches a minority of issues and would not detect the context-menu suppression discussed above. Manual testing with real assistive technology remains necessary.

Frequently Asked

Accessibility law and protected JavaScript, answered

Does the European Accessibility Act require or forbid JavaScript obfuscation?

Neither. The directive is written in terms of what a product or service must do for a user with a disability, and it says nothing at all about how the code that delivers it is written, minified, bundled or transformed. There is no clause you satisfy by protecting your bundle and none you breach by doing so. What the law reaches is the experience your interface produces, which means the relevant question is never whether you obfuscated but whether the rendered result still works for assistive technology. Two of the runtime defence options can change that rendered result, and those are the ones to review.

Which services does the accessibility regime actually cover?

The directive lists categories rather than industries, and the ones that involve a browser front end are the ones to check yourself against: electronic commerce, consumer banking services, electronic communications services, e-books and dedicated software, transport service websites and applications, access to audiovisual media services, and the software running self-service terminals such as payment, ticketing and check-in machines. Member states applied the measures from 28 June 2025 and enforce them through national market surveillance authorities, so the operative text is your member state's implementing law rather than the directive itself. Scope for your specific offering is a legal question, not an engineering one, and it is worth settling before you design around it.

What standard do the requirements get assessed against in practice?

For anything delivered through a browser, the harmonised European standard EN 301 549 is the reference, and its web content chapter adopts the Web Content Accessibility Guidelines at level AA. That is what turns an abstract legal duty into something a developer can test. It matters here because it gives you a concrete list to run a protected build against rather than a general worry: the same success criteria, the same automated checks, the same manual keyboard pass, just performed on the artifact you actually ship.

Do the code transformations themselves affect accessibility?

No, and the reason is structural rather than reassuring marketing. Renaming variables, moving string literals into a table, encoding literals, flattening control flow and reordering statements all operate on the program. Accessibility is a property of what the program produces: the elements in the document, their roles and names, the focus order, the contrast, the announced state changes. A transformation that preserves behaviour preserves all of that, because the same document is built by the same logic under different names. Accessible markup rendered by protected code is the same accessible markup.

Which option carries a genuine accessibility cost?

The developer-tools key blocking option, because of one line in what it emits. Alongside the function-key and modifier combinations it intercepts, it registers a global listener that calls preventDefault on every contextmenu event on the page. That is usually described as disabling right-click, which undersells it: the contextmenu event is also produced by the dedicated context-menu key on a keyboard and by Shift and F10 together. Suppressing it therefore removes a keyboard-reachable menu, not merely a mouse convenience, and the context menu is a route through which people reach browser reading, translation, spell-checking and text-selection features. If you are assessing against level AA, this is the option to review first and the easiest one to switch off.

Why did an accessibility overlay or extension stop working after we enabled runtime defence?

Almost certainly the anti-monkey-patching option, and the collision is inherent rather than accidental. That option takes a fingerprint of a list of built-in functions at startup and re-checks them on a heartbeat, treating replacement as tampering. Its default list includes the prototype method used to register event listeners, the timer functions, the network functions and the storage methods. Accessibility overlays, screen-reader helper extensions and assistive browser add-ons work by wrapping precisely those built-ins. The guard sees a legitimate assistive tool doing the same thing an attacker would do, and it cannot tell them apart.

How do we keep runtime defence without breaking assistive technology?

Use the two settings the option provides instead of abandoning the feature. There is an exclusion list that accepts the dotted paths you want left out of the integrity check, so a global that assistive tooling is known to wrap can be removed from the watch list while everything else stays covered. There is also a switch controlling the clean-realm comparison, which is the part that reads pristine copies of the built-ins out of a hidden frame. Turning the specific thing off is a supportable position; leaving a guard enabled that fires on a screen-reader user's own software is not.

Should we test accessibility against the protected build or against source?

Against the protected build, and this is the single most useful process change on this page. Teams habitually run automated accessibility checks in continuous integration against a development build, which is exactly the configuration in which the runtime defence options are inert, and then ship a production artifact where they are active. The two differ in precisely the area under discussion. Run the audit against the artifact that reaches users, and include a manual keyboard pass, because the context-menu behaviour described above is invisible to most automated scanners.

Does protecting our JavaScript affect the accessibility statement we have to publish?

It does not change what the statement has to say, because the statement describes how the service meets the requirements and what the known limitations are, not how the software was built. Nobody is entitled to an explanation of your build pipeline in that document. What would be relevant is a known limitation caused by a setting you chose, which is another reason to resolve the context-menu and integrity-guard questions before publication rather than describing them as limitations afterwards.

Can obfuscation make a service non-compliant on its own?

Only through its effects, never through its existence. If the protected build renders the same interface, exposes the same roles and names, keeps the same focus order and leaves keyboard interaction alone, then nothing about the transformation has any bearing on conformance. If a runtime defence option suppresses a keyboard-reachable menu or fights with assistive software, the resulting behaviour is assessable and the cause happens to sit in your protection settings. The transformation is not the risk; two specific options are, and both are configurable.

Are small companies exempt?

The directive contains an exemption for microenterprises providing services, defined by headcount and turnover thresholds, and it also allows for documented assessments where meeting a requirement would impose a disproportionate burden or would fundamentally alter the service. Both are narrower than they sound and both are evaluated against your national implementing law. Treat them as arguments your counsel may make with evidence you prepare, rather than a category you place yourself in unilaterally.

What is the shortest useful checklist for a team in this position?

Four items. Confirm with counsel whether your service falls inside the covered categories under your member state's law. Run your accessibility audit against the protected production artifact rather than a development build. Review the developer-tools key blocking option specifically for its context-menu suppression, and switch it off unless you have a reason that survives the keyboard argument. Test with at least one real assistive tool active if you use the integrity guard, and use its exclusion list rather than disabling the guard wholesale.

Related Guides

Other compliance and evidence guides

GDPR and your JavaScript

What the front end collects, who else executes on the page, and where your source travels when you protect it.

PCI DSS 6.4.3 and 11.6.1

The two payment-page requirements that name browser script directly, and what evidence each one wants.

Runtime defense reference

Every runtime option, what it emits, and the failure action it takes — including the two discussed here.

The EU AI Act and your front end

Rendered disclosure, provenance marking that has to survive the build, and why concealing a model call in the bundle achieves nothing.

COPPA, FERPA and student data

Where the accessibility cost of blocking the context menu meets an audience that is required to accommodate assistive technology.

Digital Services Act

Interface duties from the other direction, including the examinability question.

Next Step

Open your production configuration and check two settings

Look for the developer-tools key blocking option and the anti-monkey-patching option. If the first is on, weigh its context-menu cost against what it actually prevents. If the second is on, put your assistive-tooling globals in its exclusion list and test with a real screen reader. Then run your accessibility audit against the protected artifact rather than the development build, which is the change that catches everything else.