Web前端开发网

fly63.com

首页 资源 工具 文章 教程 栏目
  • 在线搜索
  • 文章标签
  • 广告合作
  • 赞助一下
  • 关于我们
资源推荐
阿里云优惠券
卓越的云计算技术和服务提供商
腾讯云优惠券
云服务器,云数据库,CDN,域名注册等多种云计算服务
扣子Coze
创建属于你的 AI 应用,AI Agent智能办公平台
豆包AI
字节跳动旗下 AI 智能助手
即梦AI
一站式智能创作平台,即刻造梦
AiPPT
全智能AI一键生成 PPT
堆友AI
零门槛,多风格AI绘画免费生成,电商海报设计神器
蜂小推
不扣量的项目推广平台
SpeedAI
一键去重、降AIGC率、数据可视化、论文写作

资源分类

AI智能 酷站推荐 招聘/兼职 框架/库 模块/管理 移动端UI框架 Web-UI框架 Js插件 Jquery插件 CSS相关 IDE环境 在线工具 图形动效 游戏框架 node相关 调试/测试 在线学习 社区/论坛 博客/团队 前端素材 图标/图库 建站资源 设计/灵感 IT资讯
网站收录 / 问题反馈

a11y-dialog

分享
复制链接
新浪微博
QQ 好友

扫一扫分享

网站地址:#
GitHub:https://github.com/edenspiekermann/a11y-dialog
网站描述:一个非常轻便和灵活的可访问模态对话框
访问官网
GitHub

A11y Dialog一个非常轻便和灵活的可访问模态对话框。它没有依赖关系,一个JavaScript api,dom API和事件处理。 


特点

无依赖项
利用本机<dialog>元素
overlay叠加点击和关闭对话框ESC
切换aria-*属性
捕捉和恢复焦点
触发事件
DOM和JS 
API快速而微小 


安装

npm install a11y-dialog --save


使用

<!--
  Main container related notes:
  - It can have a different id than `main`, however you will have to pass it as a second argument to the A11yDialog instance. See further down.
-->
<div id="main">
  <!--
    Here lives the main content of the page.
  -->
</div>

<!--
  Dialog container related notes:
  - It is not the actual dialog window, just the container with which the script interacts.
  - It can have a different id than `my-accessible-dialog`, but it needs an `id`
  anyway.
-->
<div id="my-accessible-dialog">

  <!--
    Overlay related notes:
    - It has to have the `tabindex="-1"` attribute.
    - It doesn’t have to have the `data-a11y-dialog-hide` attribute, however this is recommended. It hides the dialog when clicking outside of it.
  -->
  <div tabindex="-1" data-a11y-dialog-hide></div>

  <!--
    Dialog window content related notes:
    - It is the actual visual dialog element.
    - It may have the `alertdialog` role to make it behave like a “modal”. See the “Usage as a modal” section of the docs.
    - It doesn’t have to be a `<dialog>` element, it can be a `<div>` element with the `dialog` or `alertdialog` role (e.g. `<div role="dialog">`).
    - It doesn’t have to have the `aria-labelledby` attribute however this is recommended. It should match the `id` of the dialog title.
  -->
  <dialog aria-labelledby="dialog-title">
    <!--
      Closing button related notes:
      - It does have to have the `type="button"` attribute.
      - It does have to have the `data-a11y-dialog-hide` attribute.
      - It does have to have an aria-label attribute if you use an icon as content.
    -->
    <button type="button" data-a11y-dialog-hide aria-label="Close this dialog window">
      ×
    </button>

    <!--
      Dialog title related notes:
      - It should have a different content than `Dialog Title`.
      - It can have a different id than `dialog-title`.
    -->
    <h1 id="dialog-title">Dialog Title</h1>

    <!--
      Here lives the main content of the dialog.
    -->
  </dialog>
</div>



仅供个人学习参考/导航指引使用,具体请以第三方网站说明为准,本站不提供任何专业建议。如果地址失效或描述有误,请联系站长反馈~感谢您的理解与支持!

链接: https://fly63.com/nav/2859

更多»
热门资源
swiper
目前应用较广泛的移动端网页触摸内容滑动js插件
官网
GitHub
layer
layer是一款口碑极佳的web弹层组件
点击进入
GitHub
iScroll.js
IScroll是移动页面上被使用的一款仿系统滚动插件。
官网
GitHub
wangEditor
基于javascript和css开发的 Web富文本编辑器
官网
GitHub
ueditor
由百度web前端研发部开发所见即所得富文本web编辑器
官网
GitHub
highlight
Highlight.js 是一个用 JavaScript 写的代码高亮插件,在客户端和服务端都能工作。
官网
GitHub
UglifyJS
一个js 解释器、最小化器、压缩器、美化器工具集
官网
GitHub
lozad.js
高性能,轻量级,可配置的懒加载图片工具
官网
GitHub
Sortable.js
简单灵活的 JavaScript 拖放排序插件
官网
GitHub
validate.js
表单提供了强大的验证功能,让客户端表单验证变得更简单
官网
GitHub
Draggin.js
一款兼容移动手机的js拖拽插件
官网
GitHub
lazysizes.js
响应式图像延迟加载JS插件【懒加载】
官网
GitHub
类似于a11y-dialog的资源
rome
纯js可定制的跨浏览器日期时间选择器插件
官网
GitHub
compressor.js
纯前端图片压缩js库
官网
GitHub
Luckysheet
一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源
官网
GitHub
TheoremJS
用于在JavaScript中进行计算的数学库
官网
GitHub
math-as-code
用JavaScript代码理解数学符号
点击进入
GitHub
hopscotch.js
使开发人员可以轻松预览产品并添加到他们的网页
官网
GitHub
jscpd
一款开源的JavaScript的工具库
点击进入
GitHub
vue-virtual-scroller
带任意数目数据的顺畅的滚动
官网
GitHub
目录

手机扫一扫预览

》
分享组件加载中...
首页 技术导航 在线工具 技术文章 教程资源 前端标签 AI工具集 前端库/框架 实用工具箱 广告合作 关于我们

Copyright © 2018 Web前端开发网提供免费在线工具、编程学习资源(教程/框架/库),内容以学习参考为主,助您解决各类实际问题,快速提升专业能力。