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. Eclipse打开ftl文件,高亮显示

    解决方式一:下载eclipse相关的freemarker插件 解决方式二:原生解决方式,方法特点无需下载插件,和eclipse编辑html和jsp文件一模一样 步骤: 1:windows---pref ...

  2. 杂项-事务:OLTP(联机事务处理过程)

    ylbtech-杂项-事务:OLTP(联机事务处理过程) On-Line Transaction Processing联机事务处理过程(OLTP) 也称为面向交易的处理过程,其基本特征是前台接收的用户 ...

  3. [转载]Windows&nbsp;Server&nbsp;2008&nbsp;R2&nbsp;之二十五AD&nbsp;RMS信任策略

    原文地址:Windows Server 2008 R2 之二十五AD RMS信任策略作者:从心开始 可以通过添加信任策略,让 AD RMS 可以处理由不同的 AD RMS 群集进行权限保护的内容的授权 ...

  4. ASCII编码

    ASCII(American Standard Code for Information Interchange,美国信息互换标准代码,ASCⅡ)是基于拉丁字母的一套电脑编码系统.它主要用于显示现代英 ...

  5. python笔记:文件操作

    1.逐行打印整个文件 # -*- coding: utf-8 -*- f = open("test",'r',encoding="utf-8") count = ...

  6. Blender插件之操作器(Operator)实战

    前言 在Blender中, 操作器(Operator)是它的核心. 用户通过各种操作器来创建和操作场景中的物体. 操作器对象继承自 class bpy.types.Operator(bpy_struc ...

  7. python基本数据类型之元祖tuple

    元祖tuple 是对列表的二次加工,书写格式为括号(),里面放元素 元组的一级元素不可被修改,且不能被增加和删除 一般写元组的时候,推荐在最后加入逗号,  能加则加 创建元组 ? 1 tu = (11 ...

  8. P1410 子序列

    题目描述 给定一个长度为N(N为偶数)的序列,问能否将其划分为两个长度为N/2的严格递增子序列, 输入输出格式 输入格式: 若干行,每行表示一组数据.对于每组数据,首先输入一个整数N,表示序列的长度. ...

  9. 用opcity模拟zindex渐变的效果

    github地址: https://github.com/echoorx/opacity-Gradient zindex好像不能渐变改变,所以用opcity来模拟 <!DOCTYPE html& ...

  10. JavaScript数组的操作

    <html> <head> <meta charset="utf-8"> <title>无标题文档</title> &l ...