-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve accessibility of keyboard focus and skip links in IE11 #18671
Comments
This should be fairly easy to add since we already do most of the work that script does. We always intercept navigation and know when it is an anchor nav already so no need to listen to amphtml/src/service/viewport/viewport-impl.js Line 493 in a2f9c1d
Anyone interested in contributing this fix? (Our IE11 support is essentially "it will not be perfect, but it will work", so if this was not an a11y issue it would have been up for debate as this will increase V0 size by a bit. We are looking at only a few bytes anyway, so I am 👍 @kristoferbaxter ) |
I agree with your assessment @aghassemi. Would love to see this change and am happy to find some other bits to remove in our quest to a smaller runtime. |
I am new to amphtml codebase and ready to fix this issue to get familiar with the codebase. Although I can write some good JS and excited to explore web components and progressive enhancement used in amphtml codebase. |
Thanks @sagarkbhatt. bit.ly/helpamp has some good getting started documentation. Also this talk from AMP Contributor Summit could be helpful: https://www.youtube.com/watch?v=kjn322ELFvs&t=0s&list=PLXTOW_XMsIDQTgsP8P77-aTu26D4_N3Kt |
Used tryFocus instead of element.focus
@aghassemi Ref code: |
/to @aghassemi I have updated changes to fix the issue that I mentioned above. Can you please take a look at it. Thank you |
* [ampproject#18671], Fix a11y issue for IE platform * [ampproject#18671]: PR Feedback fix Used tryFocus instead of element.focus * [ampproject#18671]: Update implementation approach * [ampproject#18671], Remove unused import
cf. Automattic/_s#1206 and Automattic/_s#136 |
What's the issue?
In WordPress themes it is extremely common for there to be a JS file included like this: https://github.com/Automattic/_s/blob/master/js/skip-link-focus-fix.js
The purpose of this JS is to fix an accessibility issue in IE11 for keyboard-only users. In particular, per Automattic/_s#136:
In work on the AMP for WordPress plugin, this is a common bit of JS that is encountered which must be suppressed to avoid validation errors. However, in doing so then IE11 users miss out on the a11y fix.
See also:
Should this a11y fix be made part of the AMP runtime?
What browsers are affected?
IE11
The text was updated successfully, but these errors were encountered: