Testing the accessibility of widgets injected into web pages: Is there a tool to do this? - accessibility

Problem statement: I have a web page which has widgets on top of it (basically these are injected using JavaScript into the web application). I would like to know if we can find any accessibility violations (WCAG 2.0) in my widgets.
Most of the tools available in the market are capable of scanning through the browser content and give a report of the violations as per WCAG 2.0 (A, AA, AAA).
So I'm specifically looking for a tool which can tell me the violations happening in widgets which are actually not part of web page itself. They are injected into the web application through JavaScript injection.

I would recommend using the Wave tool:
https://chrome.google.com/webstore/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh
The widget should still be able to capture errors if something is inject to the website since the wave tool only triggers the scan once you initiate it.
If it's an iframe, you can possibly visit the iframe link directly and run the wave tool on the iframe URL page.
However, please note that it is a tool so it can still fail or show some false positives. Manual auditing for accessibility is always recommended.

There is a plugin called Axe - Web Accessibility Testing for Google Chrome.
You can run the audit at any particular point, so as long as you run it after the widgets have initialised it will work.
If you experience issues testing with this tool then there is something actually preventing those widgets being accessed in the first place as I have used this for numerous projects with dynamically loaded content without issue.

Related

What is the the best framework to use for Single Page Applications

Im very new to programming and I'm wondering if someone can point me in the direction of how to make a website show 3 images that represent products and instead of redirecting me to another page but instead stay on the current page and show information about that product which can lead to a purchase.
I'd like to be able to build a SPA, but I'm in the early stages of learning HTML, Css and Javascript. What are the best framework to start using if i want to create a information website with just contact info, about me sections and so on.
The term what you are searching is Single-Page Applications (SPAs) which are Web apps that load a single HTML page and dynamically update that page as the user interacts with the app.
To have smooth scroll and other animation effects, you need to write JavaScript that can run be executed in the client side. I strongly recommend you to use a framework which is specifically designed to develop client side web applications such as Angular, Jquery. There are lot of options and I can't just specify all of them nor recommend specific one without knowing your actual requirements.
Do a basic research on Single-Page Applications, client side web applications in Internet, you will find lot of frameworks and tutorials.
The simplest way to use single page application nowadays is using frameworks like bootstrap. You could use their ready functionalities.

Using a Shiny html application within a Qt application

Just a general question: is it possible to display & interact with a Shiny-generated html page with charts, dropdown menus and other elements, within a Qt application? I've browsed at some documentation and videos for QtWebKit and WebView, and while mentions of basic html display are covered, I'm just wondering about more-involved uses.
The R code which I have on a VPS displays the Shiny app in html already, and is accessed via direct URL.
It depends on what you mean by "interact": who does the interaction?
A human user interacts directly with the page - that's the easy case. Use the web view.
Qt bundles a complete Chromium web engine. Anything Chrome can do, so can Qt's web view. As long as your page works in the Chrome version that uses the same Chromium version as Qt does, it will be fine in Qt's web view.
Your code interacts with the page - that's more involved. You'll have to add a remote control channel working on top of websockets to interact with the page. It could be as simple as the Qt application sending javascript to execute on the page, and receiving back the json-serialized results. That gives you the most power at the lowest implementation cost (a few dozen lines of javascript and C++).

Implement a multiple web project structure in asp.net webforms

I'm working in a web application that has several areas of bussiness work. With time it's size has became a problem to develop on and to maintain.
I would like to break the web project into several sub-projects or libraries depending on a main root web project that has the common files to share (Masterpages, Resources, Css, etc...)
Ideally I would like to have some kind of injection that allows me to optionally publish that "components" or simply publish a customized variation, although it's configuration depended on after deploy DB setup.
I searched all over the web, reading all the pages related to multiple projects, dependency injection and composite apps that I could find, 'till I soften my head, but couldn't find anything really useful.
Major part of the writings where a theoretical approaches or unit testing applications (well, you can't make your desired app, but you still can unit test something else)
Other approaches simply don't work in VS2010 .Net 4.0
Can someone address me on a COMPLETE solution or an example? Or simply lets discuss.
We say that the solution has the following structure, with module contents already separated into directories:
Solution
L_ Datalayer library project
L_ Bussiness logic /common utils library project
L_ Web project
L_ Controls
L_ Images
L_ Css....
L_ Warehouse
L_ Sales
Masterpages
...
Warehouse and Sales contains pages related to the "module"
Thanks,
I post my progress in the subject.
As per suggestion of Steven I experimented further more using MEF. Due to the lack of documentation, specially for webforms, that was a pain in*. So far I managed to implement MEF in my solution and sucessfully inserted a plugin project visible for the main app.
Then loads the available plugins, through an interface that has the plugin name, the default page url and its order, picks all this data and render a menu tab. That part it's easy.
Clicking on a menu element must redirect to the main page of the plugin, which will render several menus for its pages contained (from another export interface)
I finally got an aspx page embedded as a resource in the plugin project. Where I'm currently stuck.
¿Is there any way to render a page embedded as a resorce on a libray using MEF or I'm forced to also use a VirtualPathProvider? ¿Hows specifically the statement to redirect to that page? I've tried several ways but no-one works (MEF and VirtualPathProvider)
I looked at zillion of articles that talk about it but all them end doing control rendering, not page. So frustrating.
Though it is not an answer to your question, I am adding it as answer due to length of my suggestion.
I suggest you look into the approach NopCommerce is following where they have extended over .net with their own framework, which supports Plugins and extensions to existing solutions. Though I definitely know that nopcommerce is an ecommerce solution but if you study it, you can modify it according to your business needs or at least it can give you a heads on for what you should adopt while designing your solution. Hope it helps.

Can Microsoft OCS be embedded into an asp.net web page. How long should it take?

I have been told that Microsoft OCS is a bit like Windows Messenger.
Can it be added to a web page by inserting and configuring some standard code so we end up with something like this:
I know there is an OCS API but I don’t want to spend days piecing an OCS app together from this.
I was hoping there would be a component that allows me to stick the whole app on a web page and configure it to operate correctly. I presume this is something that would take less than 2 days if it is possible. Can someone advise if this is about right for an experienced developer?
I understand the web page would need to be in an Intranet with Active Directory.
Sort of a yes and no answer, this... There is no simple way to embed the entire client in a web page, but you can embed the important stuff - a list of contacts with their presence, and the Click-to-Call functionality. This approach relies on the end users having Communicator, Office and IE installed.
See my answer about NameCtrl here. There's a bit of javascript and state tracking involved if you're displaying more than one contact, so 2 days feels about right.
It's worth bearing in mind that this will work if the web page itself determines which list of contacts to show. If the contact list instead needs to be pulled from the user's Communicator, this isn't supported for web pages (some parts of the Communicator API are marked as NotScriptable for security reasons). You'll need to use the Office Communicator Automation API, and create a .net COM Interop wrapper around it. I've detailed a workaround to that here (this example discusses Silverlight, but it should be the same for javascript). I'd give this another couple of days on top of the original 2.
It's also worth bearing in mind that this approach will work with OCS, and will continue to work if the customer upgrades to Lync Server 2010. If they are already on Lync Server 2010, then the simpler approach is to use the Silverlight controls. Probably only a day for this approach.

Should I create a JQuery server control for ASP.net to best use it in my apps?

I have been rather successful in promoting JQuery within my organization. No small feat on it's own. However, one of the ideas being kicked around here to make it part of our app is to create an ASP.net server side control. (We are going to be sticking with WebForms for the foreseeable future.)
I'm not too wild about this approach as it seems like overkill when a couple of script tags will do the job. We found an article on the web, and the amount of code involved really doesn't seem to justify itself. However, I do hear that there is some benefit in the script caching or generating that happens with the server controls.
My questions:
Has anyone else written an ASP.net server control to serve up the JQuery js code?
Does anyone else think that this is a crazy idea to just avoid writing JQuery or Javascript code?
I know Microsoft (along with Nokia) is "mainstreaming" jQuery and will be integrating it with future versions of Visual Studio. You may want to explore how they'll be officially using it so you can tailor your setup now, and hopefully ease your transition to "official MS jQuery" down the road.
I agree with you. It is not worth the time to create and overhead to create a control to make to add a JQuery script location.
A better solution would be to have 1 .js file that has all the links required to load on the page. That could eliminate allot of .js links, if that is the issue with the team.
The only time I would excuse creating a custom control to just link JavaScript would be for whatever reason you did not want to copy the JavaScript to the server and want to be embed it into the .dll. However you will not stop people from seeing the JavaScript on the page because if you embed the files in the .dll you must register them in the header as the full script file.
One reason for using a server control for injecting the JavaScript reference is that it is easier to control which JavaScript files get added to a page. Imagine a scenario where you use jQuery core, plus jQuery UI and a handful of other plugins. Depending on how you coded this control, you could allow a developer to easily choose which features were needed for a specific page without worrying about the specific scripts needed. This approach would allow you lots of flexibility for segmenting your application: for example the server control might be used by a master pages, a child page, user controls or another server control. If the master page registered a requirement for one jQuery library, but the child page or one of the user controls requires additional libraries, then having a unified API makes this simple. Personally, I believe this is best handled by a helper library rather than a server control.
The bottom line is how much you want each developer re-inventing the wheel or using a common, simple to use API which enforces uniformity across your apps.
I found Scott Hanselman's blog post with a sample app that has ASP.net AJAX + JQuery. It's a simple app, but it includes all the javascript with script tags. I don't see any advisement to use a server control to serve up the scripts.

Resources