How does magnifyingGlass work for Geo Chart? - google-visualization

It sounds that magnifying glass feature is very useful for small countries (e.g. Andorra, Liechtenstein, etc.). However, I never seen any region got magnified in my test. According to the document, the default value is {enable: true, zoomFactor: 5.0}, so it should be enabled by default. Why can't I see the effects? How should I make it work?
BTW: I tried both latest Chrome and Firefox, none of them works.

The magnifying glass appears when the user lingers over a cluttered marker. When the user lingers over a cluttered marker, a magnifiying glass will be opened.
Note: this feature is not supported in browsers that do not support SVG, i.e. Internet Explorer version 8 or earlier.

Related

Make windows 10 narrator to speak some text

I'm making a GUI application in C++.
Is there a simple way to make the narrator of windows 10 to speak some text ?
Given of course that it is currently active.
A trick that sometimes works is to select some text in a text field and then focus it briefly. But
It doesn't work all the time
The focus is moved out and back. Even if it's for a short time, it's invasive and may disturb whatever the user is currently doing
The text field must be present at some place on screen, what is not always desired
If possible, I would like a solution without these three issues.
Other screen readers, in particular Jaws and NVDA, provide API to do this.
I'm even the author of a library, UniversalSpeech, which allow to make the currently running screen reader, if any, to speak text, abstracting the need to detect yourself which one is running.
Given that the narrator has greatly improved with the last 3 or 4 releases of windows 10, it would probably be interesting to support it, not only in my own program and for my particular usecase, but for everybody in my library.
However, I can't find any documentation or anything telling me if the narrator has an API similar to those of Jaws or NVDA.
In fact if there is currently no such API for Narrator, it would probably be interesting to suggest Microsoft to add one.
Note that this question is different from such as this one
where the answer suggests to use speech API directly. Using screen readers API and not speech API directly has great benefits:
Screen reader users are used to specific voice settings (voice, rate, pitch, language and regional accents, etc.). The default settings set in the control panel may not at all be similar. It implies
whether the user must configure speech settings in the control panel, what is global for all applications; not very good
and/or managing application-specific speech settings in a business application which isn't at all devoted to speech stuff; it would be rather strange to find speech settings in a financial app for example.
Using both screen reader and independent speech engine simultenously means that both can speak at the same time, what is of course extremely annoying. In fact in practice it happens quite often, I have already tested.
So, is there a simple way to make narrator to speak some text ?
My program is in C++, the library is in C, so in theory I have access to the whole winapi, through LoadLibrary/GetProcAddress if needed.
Please don't give any C# or VisualStudio-dependent solution.
Thank you.
After quite a while, I answer my own question !
IN fact, the simplest to make narrator speak something is probably to:
Define some label as being a live region
When something has to be spoken by narrator, change the text in the label and then send an update notification
Turning a label into a live region and sending a notification whenever the text changes is explained here:
https://learn.microsoft.com/en-us/accessibility-tools-docs/items/win32/text_livesetting
Live setting can be set to 0=off, 1=polite and 2=assertive. The meaning of polite and assertive are the same as in WAI ARIA.
Though as present (april 2021), narrator always interrupts speech as soon as the text of the label is replaced, even in polite mode.
What changes in assertive mode is that the text even take priority against interruptions due to normal keyboard navigation, i.e. you may not hear where you are when pressing tab, arrow keys, etc.
For that reason, I don't recommand it at all.
Note also that live setting only works on static text controls (win32 STATIC window class).
It is totally ignored when applied to text fields and text areas (win32 EDIT window class).
The label with live setting still works when placed off-screen or even hidden.
As far as I know, Microsoft Narrator doesn't expose the API for developers, and you can suggest a feature for it using Feedback App on Windows 10.
I want to achieve the same behavior as in a live region, i.e. have some text read by the SR as it appears at the bottom of a multiline rich text field, but in a native GUI app. For info, I'm using WXWidgets.
You can use the UI automation events to subscribe the property change of rich text field so that you can get notified when the text is updated. And since you are using third-party control, you also need to implement providers for any third party controls that do not include a provider. And below are links about UI automation provides and
UI Automation events for your reference:
UI Automation Events Overview
UI Automation Providers Overview

Google Glass GDK view error, sad cloud TableView

I have a simple glass application Live Card which displays fine when debugging on Google Glass, however if I add a TableLayout (with or without rows) and debug on glass, I get the sad cloud. The card uses no dependent resources like network connectivity.
As documented here, TableLayout is not one of the types of views/widgets that are supported by RemoteViews. (This is a restriction in the Android framework and not Glass-specific.) Whenever RemoteViews fail to inflate properly, it is manifested as this "sad cloud" image.
You may want to consider redesigning your layout to use nested LinearLayouts instead in order to get around this restriction.

detect whether the browser supports famo.us

I want to detect whether a visitors browser is capable of running famo.us - if not redirect them.
My first thought was Modernizr and detect whether the browser is capable of CSS 3D transformations, though i'm worried that this may be too severe as famo.us is adding some backward compatibility perhaps through shims.
I'm currently using WURFL for device detection, though this doesn't give enough browser information as far as i can tell.
Any thoughts on this?
The standout feature that famo.us depends on is CSS preserve-3d which is key to doing CSS 3D transforms and what famo.us depends on to render correctly.
You can use the cutting edge 3.0 beta of Modernizr to test for this support specifically. I'd recommend using it over reading the User Agent, as you'll always get weird false positives somehow. Using the current 2.x release will not work, as testAllProps won't support the two parameter syntax.
if(Modernizr.testAllProps('transformStyle', 'preserve-3d')){
//true
// run famo.us code!
}
else
{
//false
// famo.us 3d transforms won't work right, so lets compromise
}
There's been quite an effort to track this one on the Modernizr teams part, so if you find any issues, let them know here.
You will need to do it via user agents to detect browsers and versions. See:
https://stackoverflow.com/questions/23219710/famo-us-browsers-supports
https://github.com/Famous/famous

Google Glass GDK Theme for XML layout

Is there a theme that we can use in Eclipse or Android Studio for doing XML layouts? I know we should use:
<style name="CustomTheme" parent="#android:style/Theme.DeviceDefault">
to get the Glass theme on the device, but how about while laying out in the editor?
Since it looks like the XML got eaten up in your original post, I'll repeat the tips to get the Glass theme on the device: remove any android:theme attributes that your IDE has automatically inserted, or if you need a custom theme, have it inherit from Theme.DeviceDefault (see GDK: Glass theme and UI widgets).
Eclipse and Android Studio do not yet provide an out-of-the-box exact Glass layout experience. You can approximate it fairly well by creating a device definition in the AVD Manager that matches the screen resolution on Glass (640 × 360, notlong, hdpi) as suggested by this post.
Then, select that device definition in your layout editor. You may also want to select Theme.DeviceDefault.FullScreen.NoActionBar to remove the status bar and action bar in your editor preview.
You might want to look at how I accomplished getting the Glass theme (which is just no theme as discussed in https://developers.google.com/glass/develop/gdk/ui/theme-widgets) in a Hello World app for Glass. Since the ADT in Eclipse creates a Theme by default and assigns it to the application in AndroidManifest.xml, I just had to remove it.
Here is a Git commit that shows this in action: https://github.com/luisdelarosa/HelloGlass/commit/a58208ddef2b9b25ac605735da0dd93860492477
Specifically I looked for this line in AndroidManifest.xml and removed it:
android:theme="#style/AppTheme"
I also removed the res/values/styles.xml since it was not being used anymore - it only had the themes in it.
As for having a graphical editor for Glass layouts, I don't think this is that well supported yet since we are still in Sneak Peek mode. Perhaps once we get to the Developer Preview mode, the Glass team will create editors that will allow us to design for the Glass UI exactly.

Is there a list of Android widgets present on Google Glass XE11?

As seen by the GDK sample code, there is a set of Android Widget classes (TextView, etc) that are supported on Google Glass. Has anyone compiled a list? I would love to know what options I am working with prior to the official GDK.
According to what I have gathered, you should be able to use any UI element within your application using GDK (it's simply an Android activity displayed in Glass). There are some services that aren't available though, that is really the only limitation at the moment. Some limitations I've spotted are: SpeechRecognizer not available - use RecognizerIntent instead, GPS might have some issues/limitations.
Since Glass is built on Android, all of the standard Android widgets are available. You should, however, restrict yourself to widgets that provide a high-quality user experience on Glass. For example, buttons and checkboxes aren't very usable since the user can't click on them directly.