medialize / ally.js

JavaScript library to help modern web applications with accessibility concerns
http://allyjs.io/
MIT License
1.53k stars 83 forks source link

[ally.fix.pointerFocusParent] keyboard shown on every tap in iOS10 #153

Closed rodneyrehm closed 7 years ago

rodneyrehm commented 7 years ago

Concerning: ally.fix.pointerFocusParent User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B100 Safari/602.1 ally.js version: 1.3.2

Steps to reproduce the problem

  1. open the demo page in iOS10 Safari
  2. tap on the fixed link
  3. notice the OSK (OnScreenKeyboard) showing up

Comments

The fix is still necessary for desktop WebKit

rodneyrehm commented 7 years ago

The problem seems to be running ally/supports/supports during the handling of touchstart. For some reason iOS10 gets stuck on triggering the OSK on every touchstart. The following will show the OSK on every tap, even though the handler is removed after the first execution:

var supports = require('ally.js/supports/supports');
function run() {
  console.log("running supports tests");
  supports();
  document.removeEventListener('touchstart', run, true);
}

document.addEventListener('touchstart', run, true);
rodneyrehm commented 7 years ago

The problem is caused by a combination of tests involving an iframe: https://jsbin.com/taviso/1/edit?js,output - it occurs on iOS10.1.1, but seems to be fixed in iOS10.2.0

rodneyrehm commented 7 years ago

We now have multiple supports tests involving iframes, so reordering the tests doesn't works. This has been fixed in iOS 10.2.0. The problem can be worked around by running ally/supports/supports before the first user interaction. Therefore closing this as wontfix.