How to know accessibility software is ON in mobile browser? - javascript

I would like to display/program my HTML page differently with and without accessibility feature is ON.
How to know accessibility software ( talkback in android , voicevoer in iOS) is ON in mobile browser ?
Is there any JavaScript variable available/object to know the above?
Observation
In Android Chrome browser, if accessibility is on, software is inserting couple of JavaScript files into browser. for example, chromeVoxChromePageScript.js, etc.
chromeVoxChromePageScript.js file has a cvox object.
we can keep if accessibility is on:
if(typeof cvox !== "undefined" ){
// specific code
}
is there any better way in iOS/android?

I don't believe there is a method in iOS. One of the main principles of Apple's iOS accessibility approach is:
Making standard UIKit controls and views accessible by default.
I.e. allowing developers to make what they create accessible, rather than needing a separate interface. Accessibility should be part of the mainstream.
Could you share the feature that you think needs to be separate?
The feature you found in Android is interesting, but does that work in Firefox? (FF is generally more reliable to use with Talkback.)

Related

How to detect client's web browser is Vivaldi?

I've tried on getting browser info from javascript - navigator.userAgent, but cannot find any related string with "Vivaldi".
Please help to suggest if there are any other programming method or javascript can be used to detect Vivaldi browser?
The correct syntax in JavaScript is navigator.userAgent.
You can check window size, but it may be incorrect.
Vivaldi has its own sidebar and bottom bar that the others not.
But remember, user can change the window size to prevent detection.
According to Vivaldi, the userAgent will not have Vivaldi in it for a better user experience and mimic Chrome in all sites except a few known ones.
For the next release of Vivaldi, we have decided to try something different. The problem with our current approach is that with the web being almost infinite, we can’t possibly discover all the websites who have blocks set against us. Thus maintaining a list of sites where we present a non-Vivaldi User Agent is difficult. Instead, we will try doing the reverse. For a handful of sites where we know the label Vivaldi (and our version number) is responsibly used, we will present our full User Agent. Those sites being our own and a handful of interesting alternative search engines: duckduckgo.com, ecosia.org, qwant.com, and startpage.com. Every other site will get a User Agent that appears to be identical to Chrome.
src: https://vivaldi.com/blog/user-agent-changes/
Since you haven't mentioned your use case, assuming you are building sites, the best solution would be to do what everyone does. I recommend building websites agnostic to browsers and devices, but responsive to resolutions and feature support. Almost all of the browsers are running on Chromium these days, except Safari and Firefox (to my knowledge). So they are all going to work consistently across the board. For any given feature, one could always refer to w3c or mdn docs for compatibility and build around that.
Browser detection is also not quite reliable, as there are extensions to spoof the information. Like this extension that mimics a TV agent so one can run youtube console version on it.
On the other hand, once again I don't know your use case, one might benefit from platform detection over browser detection, like catering to mobile and TV users. Even then, if you have a site responsive enough the platform becomes non-essential information.

Cordova / Phonegap Globalization vs. navigator.language

I want to implement some mechanism to automatically selecting UI language for my Cordova application. The application is also served from the web (i.e. browser).
From what I see, I can either use the Cordova globalization API plugin (here) or, it seems that both Android and iOS support navigator.language which give the device language.
Is there any reason I should opt to use the Cordova plugin over the built in browser/Web View property?
Thanks!
After a series of searches and tests on real devices I can say that the two methods to retrieve the language of the device are more or less the same except for two small differences:
on iOS devices the user can choose separately the language and the region of the device. So, for example, it can choose as a language italian but as region USA. In this situation, the plugin will return the string it-US differently by the navigator.language property which will return the string it-IT (tested on iOS 11). If you have to know just the language this isn’t a big problem.
On Android, there is a bug because of which the navigator.language is not immediately updated. The new setting is available only after the application is killed. The plugin does not suffer os this bug. A workaround could be to use the navigator.languages property which is correctly updated (tested on Android 5.0.2).
If you have to know just the language you can use the information provided by navigator object without any problem.

browser plug-in or extension, which to choose?

I intend to modify the display of existing websites.
For example, when Google returns search results, can I customize the web page displaying (such as adding some bubble visualizations onto that page's blank places) ? Could it be done using browser plug-in or extension?
Based on my knowledge, a browser extension, such as firefox or chrome extension, is usually for adding tiny icons to the address bar.
Could it be done using browser plug-in or extension?
Yes. But you don't want to write a browser plug-in. They're fairly complicated to write and users are reticent to install them (with good reason) Further, you'd have to write two, as Mozilla and Google can't agree on a format (Chrome is removing the venerable NPAPI, but Mozilla won't implement Google's PPAPI, claiming that it's a moving target with inadequate documentation).
Based on my knowledge, a browser extension, such as firefox or chrome extension, is usually for adding tiny icons to the address bar.
No. Firefox add-ins and Chrome extensions can do a lot more than that, including modifying the page once it's rendered.
So you'll probably want to write a Firefox add-in and a Chrome extension. (Sadly, yes, that's two codebases to maintain, although they use similar technologies — HTML, CSS, JavaScript — so you can share a bit between them.)

Developing a cross-platform self-contained HTML application

I am thinking of building an application, kind of like TiddlyWiki in the sense that everything is self-contained in an HTML file, or at least in a bundle where a user won't have to install anything. It works on just about any browser, and on mobile phones (Android and iPhone), and in some browsers (e.g. Firefox), manages to save to the local filesystem without a plugin (albeit, it launches many security warnings, but there are other solutions for that). Other browsers happen to use a Java plugin to bypass this restriction.
Are there any technologies that exist that make this possible? HTML5's web storage sounds like it would be almost perfect, except that the data would be tied to the browser.
Any assistance would be appreciated (even if that just means editting / retagging the question to get more folks looking).
Whats about the fileapi: http://caniuse.com/#search=fileapi
I am just adding a relevant comment with this but not exactly an answer...
When you are saying that you want to develop application which contains everything... Then I would like to add about Titanium, PhoneGap, and others (Corona)...
This softwares provides JavaScript base which will be running on all the mobiles (if mobile applications), desktops (if desktop applications) and so on.... But Titanium (as i am working on it) works on the SDK of all the other languages for development...
Now TiddlyWiki, what i have understood from the link is that it is creating a web application or something like that which will work on all the other mobile devices. But this is NOT Good always, Since some application needs to be a NATIVE environment (which is supported by Titanium). Native applications will be much more faster than any other developed applications..

Mozilla Firefox programmatic screen capture

I'm interested in writing javascript that will programmatically perform a screen capture of what is viewed in the browser, and save the file to the hard disk. I'd like to be able to type in a list of keywords, and use a search engine's api to programmatically view the page, and take a screen capture.
My first question is, does this sounds like something that would violate the terms of my browser, Firefox, or any or all search engine api's? All of my web development experience is Internet Explorer. I'm aware of the various free and open source applications available, but am not familiar with their licenses.
Is this something that could be done using javascript? I've noticed that there are screen capture add-ons available to install. Is it possible to execute an add-on programmaticaly through javascript?
Is their a Firefox / Mozilla equivalent to an ActiveX control?
Any information would be greatly appreciated.
Thanks
You can use flash/Active X to do it. Check out Kpoint.in, It records the entire desktop from within the browser(Works only for Windows though). I think they are using their own Firefox extension for the Audio.

Categories

Resources