Sometime when some component is offscreen, but still get focus when we tab though the page.

This can cause users' confusion.

One easy to to find out the offscreen component is typing in your console,

document.activeElement

It will shows your the current focus element.

Then what you need to do is add CSS so that it won't get focus anymore.

  display: none;
visibility: hidden;

When it comes into screen, set CSS:

  display: block;
visibility: visibile;

[HTML5] Handle Offscreen Accessibility的更多相关文章

  1. [HTML5] Semantics for accessibility

    For example, when we use checkbox, if we do like this: <div class="inline-control sign-up co ...

  2. [HTML5] Accessibility Implementation for complex component

    When you developing a complex component by your own, one thing you cannot ignore is Accessibility. C ...

  3. [HTML5] Using the focus event to improve navigation accessibility (nextElementSibling)

    For a menu item, when we tab onto it, we want this element get 'focus' event, so that the submenu wi ...

  4. [HTML5] Using the tabindex attribute for keyboard accessibility

    You can make any element keyboard interactive with the HTML tabindex attribute. But you might need a ...

  5. HTML5 Differences from HTML4

    Abstract "HTML5 Differences from HTML4" describes the differences of the HTML5 specificati ...

  6. html5 Websockets development guidance

    1. WebSockets -- full-duplex communication The main HTML5 pillars include Markup, CSS3, and JavaScri ...

  7. 弹幕文化与HTML5

    分享人:herry 弹幕篇:弹幕文化与HTML5 说说弹幕 弹幕文化 1什么是弹幕? 弹(dàn)幕(mù)在国内兴起已经有个把年了,相信很多朋友都差不多知道弹幕这个东西. 弹幕系统最初的起源是一家日 ...

  8. HTML5的Server-Sent Events介绍////////////////zzz

    HTML5有一个Server-Sent Events(SSE)功能,允许服务端推送数据到客户端.(通常叫数据推送).我们来看下,传统的WEB应用程序通信时的简单时序图: 现在Web App中,大都有A ...

  9. HTML5 Canvas核心技术图形动画与游戏开发(读书笔记)----第一章,基础知识

    一,canvas元素 1 为了防止浏览器不支持canvas元素,我们设置“后备内容”(fallback content),下面紫色的字即为后备内容 <canvas id="canvas ...

随机推荐

  1. Android常用的一些make命令【转】

    本文转载自:http://blog.csdn.net/liuxd3000/article/details/39181377 1.make -jX  X表示数字,这个命令将编译Android系统并生成镜 ...

  2. nyoj--745--蚂蚁的难题(二)

    蚂蚁的难题(二) 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述 下雨了,下雨了,蚂蚁搬家了. 已知有n种食材需要搬走,这些食材从1到n依次排成了一个圈.小蚂蚁对每种食材 ...

  3. 使用串口终端安装AIX操作系统

    使用串口终端安装AIX操作系统 一.配置超级终端 首先,配置超级终端:在笔记本电脑上(Windows XP系统),点击开始à程序->附件->通讯->超级终端,配置名称为test的超级 ...

  4. Gym-101915C Shahhoud Training Hussain 模拟

    题面 题意:每天有K本书,你最多看P本一天,问N天后多少本书没有看 题解:ans=(K-P)*N; 注意一点就是P>=K的时候,ans=0; #include<bits/stdc++.h& ...

  5. 前端总结·基础篇·CSS

    前端总结·基础篇·CSS 1 常用重置+重置插件(Normalize.css,IE8+) * {box-sizing:border-box;}  /* IE8+ */body {margin:0;}  ...

  6. putty和xshell使用和免密登录

    putty和xshell使用和免密登录 XSHELL的设置 事前:我们先去关闭防火墙和selinux 关闭防火墙:   ufw disable 再去看看selinux 一.查看SELinux状态命令: ...

  7. IDEA中Lombok插件的安装与使用

    背景   我们在开发过程中,通常都会定义大量的JavaBean,然后通过IDE去生成其属性的构造器.getter.setter.equals.hashcode.toString方法,当要对某个属性进行 ...

  8. C - Twins(贪心)

    Problem description Imagine that you have a twin brother or sister. Having another person that looks ...

  9. Spring《七》ApplicationContext

    1.国际化支持 getMessage()提供了国际化支持. Bean中必须定义为messageSource. <bean id="messageSource" class=& ...

  10. Several Ideas on Perl List Context

    According to Beginning Perl Book published by Tsinghua Pub., the list context appears when you are t ...