tota11y is incompatible with requireJS (via closure compiler)
See original GitHub issueOn line 78 of /plugins/link-text/index.js there is no check to ensure that axs is defined.
let extractedText = axs.properties.findTextAlternatives(
el, alts);
and I’ve seen this when clicking the Link text test:
Uncaught TypeError: Cannot read property 'properties' of undefined
(anonymous function) @ tota11y.js:12651
jQuery.extend.each @ tota11y.js:672
jQuery.fn.jQuery.each @ tota11y.js:437
run @ tota11y.js:12636
activate @ tota11y.js:10118
handlePluginClick @ tota11y.js:113
$checkbox.buildElement.onClick @ tota11y.js:10074
jQuery.event.dispatch @ tota11y.js:4733
elemData.handle @ tota11y.js:4419
I’m also able to trigger similar errors for rules other than the Headings rule tracing back to a similar problem with axs not being defined in /plugins/shared/audit.js for config = new axs.AuditConfiguration();
I’m still trying to track down additional information as I’m including the script when pages are rendered in the CMS I’m using. I haven’t yet figured out if it is part of the CMS wrapping, or code on the rendered page that could be interfering. It appears that the use of requirejs on a page in the CMS may interfere, as pages without that appear to be working.
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Google Closure Compiler to concatenate files using requirejs
These files are in-turn dependent on other JS files and I only want the dependent JS files to get concatenated in the final...
Read more >npm - Snyk
... @jupyterlab/application · @kadira/react-split-pane · @kbsoftware/kb-base-ember-addons · @khanacademy/tota11y · @kolkov/angular-editor · @lcf.vs/css-ui ...
Read more >edx/edx-platform | Coveralls - Test Coverage History & Statistics
Test code coverage history for edx/edx-platform.
Read more >JS Party: JavaScript, CSS, Web Development - Changelog
See how other teams are using this awesome feature at about.sourcegraph.com/code-insights ... an automation library for cross-browser end-to-end testing.
Read more >Experts for js-docs discord - Linknovate
Name Score News
GitHub 143.7 11
Google 118.6 8
Netflix 55.3 5
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Got an update for you 😃
I went ahead and made a new directory containing
require.js
,tota11y.min.js
, and anindex.html
file. I also created a simplemain.js
file which exports an integer.Running this I can confirm that
axs.properties
is undefined. Strange! I went ahead and subbed outtota11y.min.js
foraxs_testing.js
(linked here: https://github.com/GoogleChrome/accessibility-developer-tools/blob/master/dist/js/axs_testing.js) and found the same result.So, I can confirm that attempting to evaluate Accessibility Developer Tools (
axs_testing.js
, which tota11y uses under the hood) results in some weird clashing of the wordrequire
.I’ll sync up with the folks from Google and see if they have a solution in mind, hang tight - sorry to keep you waiting.
I’m still experiencing this issue.