gdkraus / accessible-modal-dialog Goto Github PK
View Code? Open in Web Editor NEWAn demonstration of how to code a modal dialog/window so that it is accessible to people with disabilities.
An demonstration of how to code a modal dialog/window so that it is accessible to people with disabilities.
Hello,
When trying your demo on safari browser, using the tab key let you get out of the modal box.
From the third input field, pressing tab sets the focus to the address bar instead of the submit button.
Thank you.
Would it be possible to replace the form with an external php file (with my own form)?
Hey I took the liberty to make a new version for the script including the following features:
data-show-modal="modal-id"
) / closers (data-hide-modal
)modal.show()
, modal.hide()
)modal.shown
)[tabindex]:not([value="-1"])
to focusable elementsFind the code here: https://github.com/edenspiekermann/accessible-modal-dialog.
Find a demo here: http://codepen.io/HugoGiraudel/pen/jWQqeq?editors=0100.
Would you like me to submit a PR?
because of the fixed positioning parts of the lightbox content are currently not visible if the viewport is too small. a potential fix would be to set the lightbox height relative to the page height (with some margins) and make the lightbox-content scrollable.
The initial demo page is normal unzoomed.
When the dialog is opened, focus is on "First Name" and the dialog is zoomed. I'm not sure if this is a normal Apple thing when focus is put on an input field.
This is what I expected it to look like
I'm using an iphone 6s with ios 12.4.1. It's not a recent behavior for this iOS. It's been doing this for some time. Was just curious if it's an apple thing or if the dialog is somehow causing it. Would like to know if it happens for others.
On say a iPhone 4 sized screen the demo modal is not fully usable. It's centred and fixed and some of it is below the viewport.
I've found that the best solution on smaller screens is to go full screen and allow scrolling of the modal as required. Or at a minimum full width and max height 100% and allow scrolling.
Seems like basic functionality :)
Hi,
The unique license is nice but it refers to your name, but does not include it.
Do you have a version that includes your name?
Thanks,
Referring to http://accessibility.oit.ncsu.edu/training/aria/modal-window/version-3/
How difficult would it be to make this support multiple modals? I was looking over the JS and realized it is beyond my capabilities.
after opening the lightbox the site content can still be scrolled. setting the site overflow to hidden when the lightbox is open should fix the issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.