ARIA Live Regions and `role="alert"` not working on Mac - accessibility

I am trying to get an error alert scenario working properly with assistive technology. There are two approaches i like which I am testing:
Using ARIA Live Regions
http://pauljadam.com/demos/aria-alert-validation.html
Using ARIA Alert
http://test.cita.illinois.edu/aria/alert/alert1.php
Both of this test pages work fine on Jaws 14 and VDA on PC in that the error is read outloud. However, using a Mac with voice over it does not read the errors in those examples out load.
To reproduce:
go to http://test.cita.illinois.edu/aria/alert/alert1.php
turn on voice over with command+f5
click the guess again button after typing some numbers (the alert should be read).
Is there some non-default setting I need to be away of? Or is there a better way to do this? I'm a little surprised all theses examples do not work.

Here is solution by Steve Faulkner from Paciello Group Blog that supports Safari on Mac:
function addError() {
var elem1 = document.getElementById("add1");
document.getElementById('add1').setAttribute("role", "alert");
document.getElementById('display2').style.clip = 'auto';
alertText = document.createTextNode("alert via createTextnode()");
elem1.appendChild(alertText);
elem1.style.display = 'none';
elem1.style.display = 'inline';
}
<div id="display2" role="alert"><span id="add1"></span></div>
<input type="submit" value="Method 4 alert - display" onClick="addError()">

Related

A-Frame Daydream control?

Just started playing with A-Frame and I can see vive-controls and oculus-touch-controls but nothing for google daydream.
I've looked at the component repo and don't see anything that looks like it'll do the job. The closest thing to now investigate would be the Gamepad API, but I'm amazed I can't find anything.
I've got a Pixel XL & daydream and would like to incorporate the controller rather than just head tracking and gaze based control. Can someone point me in the right direction please.
Thanks
UPDATE - I've got the Daydream controller working for clicks! Running the 360-image-gallery(https://aframe.io/examples/showcase/360-image-gallery/) accepts clicks from the Daydream controller. I guess maybe it had timed out on my previous attempts or I hadn't paired it properly! I'll keep playing!
Working on setting up a Daydream remote in an Aframe project. There are no components for the daydream remote yet, but I'm hoping to complete one soon – and it sounds like they are gonna mainline support in an upcoming Aframe release.
But you can hand roll support no problem.
First, there are a few things you'll need to do in preparation:
Download Chrome Beta 56 on your Pixel:https://www.google.com/chrome/browser/beta.html
.
Open Chrome Beta, navigate to chrome://flags and enable the WebVR and Gamepad flags.
Now, you will be able to launch experiences that are built with Aframe v0.4 or higher in true WebVR. You'll get prompted with the usual Daydream screens (place your phone in the headset, and connect the remote.) If you are connecting to a local development environment, you'll see a secure connection warning but this, while annoying, won't stop you from working.
Second, now that you are running true WebVR, you need to leverage the Gamepad API to get information from your daydream remote. Lets start by just logging that it is connected.
window.addEventListener('gamepadconnected', function(evt) {
console.log("Gamepad connected at index %d: %s. %d buttons, %d axes.",
e.gamepad.index, e.gamepad.id,
e.gamepad.buttons.length, e.gamepad.axes.length);
});
Third, now that you are logging a connection, you will need to setup an update loop to get the current state of the Gamepad. You can do this with requestAnimationFrame. Follow the tutorial here: https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API
Once I've published a basic dayframe-remote component, I'll post a link here. Hope this helps get you started!
EDIT: Looks like the suggestion below works great. Just pass "Daydream Controller" as the id for tracked controls: tracked-controls="id: Daydream Controller".
Here is a sample Daydream controller output. At the moment, only the trackpad button appears to be exposed – not the app or home buttons.
{
axes: [0, 1],
buttons: [{
pressed: false,
touched: false,
value: 0
}],
connected: true,
displayId: 16,
hand: "left",
id: "Daydream Controller",
index: 0,
mapping: "",
pose: {
angularAcceleration: null,
angularVelocity: [0, 0, 0],
hasOrientation: true,
hasPosition: false,
linearAcceleration: [0,0,0],
orientation: [0,0,0,1],
position: null
},
timestamp: 1234567890123
}
Something for you to try...
the way the current A-Frame 0.4.0 support in tracked-controls should work:
if you specify that it should only match an ID value of empty string '' then it should match any gamepad with a pose... so you can try something like
<a-entity tracked-controls="id:"></a-entity>
and see if that gets events etc.?
A-Frame master branch now contains a daydream controller component: https://aframe.io/docs/master/components/daydream-controls.html

Windows Phone 8.1 Toast Notification not playing custom sound

I am in dire need of your help.
I am a Windows app developer and I need my app to play an alarm sound when a toast notification is received. I have tried many different loadouts and everything works fine (Even applying silent='true' in the audio tag), except, ofcourse, for the custom sound.
I have tried my dev server and I have tried with a local toast sent from the app, and nothing seems to work.
My current XML loadout is as follows (I got it from an example in MSDN):
string audio = "ms-winsoundevent:Notification.Mail";
string toastXmlString = "<toast duration='long'>"
+ "<visual version='1'>"
+ "<binding template='ToastText02'>"
+ "<text id='1'>Sound:</text>"
+ "<text id='2'>" + audio + "</text>"
+ "</binding>"
+ "</visual>"
+ "<audio src='" + audio + "' />"
+ "</toast>";
The only sound I ever managed to play was the default windows sound. No 'ms-winsoundevent' sounds, no 'ms-appx' or 'ms-appdata' sounds, nothing.
I have checked the headers and XML loadout and compared them to the MSDN documentation.
I have tried different formats (mp3 and wav) and different audio clip lengths (18secs, 5secs, 10secs, etc...)
My experience tells me that if there was a problem with the XML loadout or the headers the toast would either not arrive or the text would not show. Other than the sound however, everything works fine.
Thanks in advance for all the help you may offer.
I don't know if you have already sorted out your problem, however the issue lies in the duration="long" attribute.
According to MSDN:
Note that neither looping audio nor long-duration toasts are not supported on Windows Phone 8.1.
so you have to use duration="short" in order to be able to play the custom sound.
It is a hidden NOTE in the sound tag documentation and is not states clearly and the worst part is the notification will be displayed properly, the silence attribute will be applied but the sound will not be played. Also sound files should be less than 10 seconds but short toast notification is displayed for 5-6 seconds only and the loop will not work as stated.
Hope this helps you :)

Qualtrics.SurveyEngine.addOnload runs twice in preview mode in Qualtrics survey software

Whenever I try to test a Qualtrics survey in preview mode, Qualtrics.SurveyEngine.addOnload will be called twice. This is not a problem for conditional events (as in most of the examples), but a large problem for unconditional code a timed page change (this will be triggered twice as well). See the following snippet:
Qualtrics.SurveyEngine.addOnload(function()
{
$('NextButton') && $('NextButton').hide();
var that = this;
var timeOutInterval=1000+Math.trunc(Math.random()*10000);
alert(timeOutInterval); //for Testing only
var myVar;
myVar = setTimeout(function(){ that.clickNextButton();}, timeOutInterval);
});
If I launch the survey, this will lead to a page change after 1-11 seconds. If I preview the survey, this change will happen as well, followed by a second change. The alert will be shown twice as well.
Does anyone have a solution, how this functionality could be tested in preview mode?
I've run into Survey Preview issues with JFE as well. There are ways to get around JFE mode and preview in non-JFE mode.
If only care about a specific set of questions in a block and don't care about the survey flow, the easiest solution is to use View Block. It does not use JFE. Go to the Block drop down and choose View Block.
If you need to preview the whole survey, there are tricks to 'break' JFE and force it to non-JFE mode. These tricks seem to be a moving target as Qualtrics makes changes. The best one (easiest) I've found that is working for me today on my Qualtrics account (notice all the qualifiers) is to add an end of survey object to the survey flow, click custom, and check the "Override Survey Options" box.
If that doesn't work, I've found that once a survey gets over a certain size, it doesn't use JFE mode anymore. I don't know what the limit is, but if you add a bunch of fake questions after your end of survey you can trick it that way as well.
Qualtrics links jQuery as of current writing (albeit the shorthand $ is reserved for the prototype.js library).
Following should skip execution of addOnload javascript in the mobile preview:
Qualtrics.SurveyEngine.addOnload(function()
{
if(jQuery(this.questionContainer).parents('.MobilePreviewFrame').length)
{
console.log('Mobile Preview - skipping rest of addOnload');
return true;
};
console.log("Running addOnload()");
// The rest of your code. Log statements can obviously be removed
});
Hope this is helpful
It seems Qualtrics now defaults to JFE mode for live surveys as well. We have been able to resolve this by adding the query string &Q_JFE=0 to the end of our survey URLs, like so:
https://uleidenss.eu.qualtrics.com/SE/?SID=SV_123432434343&Q_JFE=0
This had the additional benefit of solving our issue with JFE mode breaking several of our long time running Qualtrics JQuery experiments.

Loading Song from file with Uri - XNA 4.0

I am attempting to load a song from Uri for use in my game. Code as below:
Uri uriStreaming = new Uri("file://E:/MySong.mp3");
Song song = Song.FromUri("Song Name", uriStreaming);
MediaPlayer.IsMuted = false;
MediaPlayer.Volume = 0.5f;
MediaPlayer.Play(song);
When I get in game no audio is playing at all, though I have no errors at all. I've also tried it with a http:/ link for an mp3 and it works fine, so I'm not quite sure of the issue.
Any ideas for a fix?
Edit: After further investigation of this problem, I've found out that it's the ID3 tags causing the issue, specifically if it is ID3v2.4 and if I use a tool to remove them, it plays fine. However, I can't expect my user to do this with all of their audio, so is there a workaround for this?

When listening for keypress in Flash Lite should I be listening for Key.Down or the numeric code for this key?

The adobe documentation says that when listening for a keypress event from a phone you should listen for Key.Down, however when I trace the Key.getCode() of keypresses I see a number not the string "Key.Down". I am tesing this locally in device central and do not have a phone to test this with at present. Here is my code -
keyListener = new Object();
keyListener.onKeyDown = function() {
switch (Key.getCode()) {
trace(Key.getCode()) // outputs 40
case (Key.DOWN) : // according to the docs
pressDown();
break;
}
}
My question is - is this simply because Im testing in device central and when I run it on the phone I will need to be listening for Key.Down? or is the documentation wrong? Also is the numeric code (40) consistent across all devices? What gives adobe?
thanks all
Key.Down is equal to 40 so it will recognize it as the same. So you can use whichever one you prefer, however, I would recommend using Key.Down because it will be easily recognizeable for those who dont have Key Codes memorized (most of us).
These are the Key Code Values for Javascript. However, I think they are pretty much universal

Resources