-
Notifications
You must be signed in to change notification settings - Fork 17
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
Fix: CSS to animate popups, dialog for accessibility (fixes #600) #601
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working great thanks @oliverfoster. I've tested the tabbing and screen reader capability in comparison to the current functionality (master). Drawer dialog seems consistent, but I've noted a couple of differences for Notify dialog. Not sure if these are expected or need further input?
-
Notify dialog popup title doesn't display visual focus anymore for Chrome or Safari (Mac). FF (Mac + Win) is intermittent. Chrome and Edge (Win) work as expected.
-
For Edge (Win) and FF (Mac), when tabbing through Notify dialog popup, after the close btn, focus is directed to the browser UI. Focus does loop and return to the popup elements e.g. title > prev btn > next btn > close btn > browser UI > title > prev btn etc. For Chrome (Mac + Win) and Safari (Mac), focus is contained to the popup only.
I have removed the a11y.focusNext call to allow the browser to handle it through the native dialog.showModal function. Adapt therefore no longer tries to focus on the title.
I will make sure that the default browser behaviour is utilised for the loop around. We should not stop the focus from looping around into the browser UI if that is expect. |
I've removed the Drawer easing properties from the schemas in 4e00cad. These reference easing strings that are specific to Velocity JS and are not available as a CSS transition-timing-function value. These easing methods could be reproduced using |
On reflection, I'd like this to be as least breaking as possible. I have made a sub pr to reintroduce the easing as the suggested css cubic-bezier functions. It is not possible to represent the bounce and elastic easing functions using just cubic-bezier functions, so I have gracefully replaced those with their nearest cubic-bezier counter parts, back and quint respectively and have added warnings to the console to say as much. References: |
👍 |
I've fixed it so that we support the existing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great thanks 👍
fixes #600
requires adaptlearning/adapt-contrib-vanilla#531
Changed notify and drawer to
dialog
elements fromdiv
elements. Formalised shadow as an API rather than as part of drawer. Switched to CSS animations for drawer, notify and shadow.dialog
element improves popup accessibility by using the browser to limit tabbing and readability rather than Adapt's algorithm.CSS animations provide a much smoother viewing experience as shows and slides for notify and drawer are rendered perfectly and without their usual jankiness. The show and hide behaviour of these modules will be able to be changed more easily.
Update
dialog
elementdialog
elementNew
transitions.js:transitionNextFrame
function to wait for one requestAnimationFrame allowing css changes to settledialog
elements, added deprecation warning to nondialog
popup elementsisOpen, show, hide
anim-show-before, anim-show-after, anim-hide-before, anim-hide-after
--adapt-cubic-bezier-linear, --adapt-cubic-bezier-ease, --adapt-cubic-bezier-easein, --adapt-cubic-bezier-easeout, --adapt-cubic-bezier-eastinout, --adapt-cubic-bezier-easeinsine, --adapt-cubic-bezier-easeoutsine, --adapt-cubic-bezier-easeinoutsine, --adapt-cubic-bezier-easeinquad, --adapt-cubic-bezier-easeoutquad, --adapt-cubic-bezier-easeinoutquad, --adapt-cubic-bezier-easeincubic, --adapt-cubic-bezier-easeoutcubic, --adapt-cubic-bezier-easeinoutcubic, --adapt-cubic-bezier-easeinquart, --adapt-cubic-bezier-easeoutquart, --adapt-cubic-bezier-easeinoutquart, --adapt-cubic-bezier-easeinquint, --adapt-cubic-bezier-easeoutquint, --adapt-cubic-bezier-easeinoutquint, --adapt-cubic-bezier-easeinexpo, --adapt-cubic-bezier-easeoutexpo, --adapt-cubic-bezier-easeinoutexpo, --adapt-cubic-bezier-easeincirc, --adapt-cubic-bezier-easeoutcirc, --adapt-cubic-bezier-easeinoutcirc, --adapt-cubic-bezier-easeinback, --adapt-cubic-bezier-easeoutback, --adapt-cubic-bezier-easeinoutback
--adapt-drawer-duration, --adapt-drawer-show-easing, --adapt-drawer-hide-easing, --adapt-notify-duration
config.json:notify._duration
Breaking
References
anim-*-before, anim-*-after
are similar to @starting-style