Skip to content
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

Use css to animate popups and the dialog element for accessibility #600

Open
oliverfoster opened this issue Oct 29, 2024 · 2 comments · May be fixed by #601
Open

Use css to animate popups and the dialog element for accessibility #600

oliverfoster opened this issue Oct 29, 2024 · 2 comments · May be fixed by #601
Assignees
Labels
enhancement New feature or request

Comments

@oliverfoster
Copy link
Member

Subject of the issue

Using velocity to animate the drawer and notify is not great.
Using tabindex + aria-hidden to manage popup layers is not great.

We can now use css to animate and the dialog element to control popup layers.

@kirsty-hames
Copy link
Contributor

Using velocity to animate the drawer and notify is not great.

Agreed. This makes it difficult to override or customise the animation per project. Currently we have to edit core js or use !important styles in the theme.

Using tabindex + aria-hidden to manage popup layers is not great.

Agreed. The less behaviour to manually set the better. <dialog> boxes interrupt interaction with the rest of the page being inert (hidden and inactive). Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog

We can now use css to animate and the dialog element to control popup layers.

This offers greater flexibility for differing animation styles. From pre-defined CSS transitions to creating custom keyframe animations. Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#animating_dialogs

@oliverfoster
Copy link
Member Author

oliverfoster commented Oct 29, 2024

I've not used the @starting-style or anything from animating dialogs as we don't yet have support in firefox for @starting-style or overlay.

I've instead used a pattern similar to our onscreen behaviour (as you'd previously suggested) by using before and after classes on named animations. Here we have show and hide animations with a before and after state each.

@oliverfoster oliverfoster moved this from Assigned to Needs Reviewing in adapt_framework: The TODO Board Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Needs Reviewing
Development

Successfully merging a pull request may close this issue.

2 participants