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

Accordion Example: Add animation on expand/collapse #597

Open
arbydev opened this issue Feb 6, 2018 · 7 comments
Open

Accordion Example: Add animation on expand/collapse #597

arbydev opened this issue Feb 6, 2018 · 7 comments
Labels
enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Example Page Related to a page containing an example implementation of a pattern Feedback Issue raised by or for collecting input from people outside APG task force good first issue Issue with Straightforward resolution; could be good learning experience for new contributors help wanted Task force is looking for an owner for the issue

Comments

@arbydev
Copy link

arbydev commented Feb 6, 2018

A complaint I have heard of your accordion example:
https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/accordion/accordion.html

Is that it does not smoothly animate on expand and collapse. It just blinks open and closed.
It would be nice if there were configuration options that were included in your example to choose whether it does animate and what speed and easing is used.

Here are some examples of animated accordions:

https://codepen.io/chriswrightdesign/pen/cmanI
https://jqueryui.com/accordion/
http://css3.bradshawenterprises.com/accordions/

@arbydev
Copy link
Author

arbydev commented Feb 6, 2018

Another example accordion is on the IBM Carbon design system.
http://carbondesignsystem.com/components/accordion/code

@mcking65 mcking65 added enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy help wanted Task force is looking for an owner for the issue Example Page Related to a page containing an example implementation of a pattern Feedback Issue raised by or for collecting input from people outside APG task force good first issue Issue with Straightforward resolution; could be good learning experience for new contributors labels Feb 13, 2018
@mcking65 mcking65 added this to the 1.1 APG Release 3 milestone Feb 13, 2018
@mcking65 mcking65 changed the title Accordion feedback - missing animation on expand/collapse Accordion Example: Add animation on expand/collapse Feb 13, 2018
@gaurav5430
Copy link

I am willing to take this up. Can we discuss what kind of animation we are looking for?
Can we do that in CSS + JS or do want pure CSS ?

@mcking65 mcking65 removed this from the 1.1 APG Release 4 milestone Aug 13, 2019
@mcking65
Copy link
Contributor

mcking65 commented Oct 4, 2021

@smhigley will this be addressed by #1834?

@millieloop
Copy link

Hey, was this addressed in the end? :) - I've got the exact same question as the OP. - 4+ years later.

@JAWS-test
Copy link

@arbydev and @millieloop

The ARIA APG are intended to show how to use ARIA correctly with various widgets. This is what the pattern for Accordion does. It is not about providing implementations for all visual variants (animation, font color, text size). Everyone is free to make these adjustments.

If animations are wanted, then it should be noted that they are unfavorable from an accessibility point of view, see WCAG 2.3.3

@JAWS-test
Copy link

@mcking65 I think the issue can be closed for formal reasons and in terms of content:

  • Formal: Visual adjustments can be made if necessary, they are not in the scope of the ARIA pattern.
  • Content: According to WCAG (SC 2.3.3), animation from interactions should be avoided.

@jugglinmike
Copy link
Contributor

The ARIA-APG Task Force discussed this during its weekly meeting today. Meeting minutes are available here, and I've copied the relevant part of the IRC log below:

IRC log of the discussion

<jugglinmike> Topic: Accordion Animation
<jugglinmike> Matt_King: In a meeting a long time ago, people were complaining that the accordion was jerky, and they suggested to add animation
<jugglinmike> Matt_King: We decided that we could make it animated, and we put an issue in the backlog. That was almost five years ago!
<jugglinmike> Matt_King: JAWS-test recently commented that animation is a WCAG issue
<jugglinmike> Matt_King: But the type of animation you would add here does not seem like the type of animation that WCAG is referring to
<jugglinmike> Jem: [reads the relevant text from https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html ]
<jugglinmike> Matt_King: We could agree to not add animation, or we add animation and use the CSS media query for "prefers reduced motion"
<jugglinmike> CurtBellew: Oracle animates their accordions. They're useful--I think they make them easier to use visually
<jugglinmike> CurtBellew: I don't feel strongly that animations are a necessity, though
<jugglinmike> [general discussion about the value of animation]
<jugglinmike> Matt_King: This sounds like it would be a positive and it doesn't sound like it violates WCAG 2.3.3, especially if we use "prefers reduced motion"
<jugglinmike> Matt_King: So let's go for it and resolve this old issue
<jugglinmike> Jem: I'll mention this issue in Sarah's pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Example Page Related to a page containing an example implementation of a pattern Feedback Issue raised by or for collecting input from people outside APG task force good first issue Issue with Straightforward resolution; could be good learning experience for new contributors help wanted Task force is looking for an owner for the issue
Development

No branches or pull requests

6 participants