wordplaydev / wordplay

An accessible, language-inclusive programming language and IDE for creating interactive typography on the web.
Other
60 stars 22 forks source link

Animation sequence descriptions #470

Open amyjko opened 4 months ago

amyjko commented 4 months ago

What's the problem?

When using a screen reader and trying to read a Phrase or Group on screen that has a resting animation Sequence, there should be a description of the animation. For example, this example might be described as dancing left and right with a small tilt

Phrase('🎄' resting: (((Sequence({
  0: Pose(rotation: 0°)
  1: Pose(rotation: 15°)
  2: Pose(rotation: 0°)
  3: Pose(offset: Place(-0.25m))
  4: Pose(offset: Place(0.25m))
  5: Pose(offset: Place(-0.25m))} 0.5s)))))

What's the design idea?

We could add a required description to Sequence, and then. use that description in Phrase.getDescription, Group.getDescription, and Stage.getDescription to describe the animation sequence on the output. Alternatively, we could generate a generic description based on the sequence contents, but that would probably be too low level to be helpful.

Design specification

Reporters can leave this blank. Designers should write a detailed, precise description of what is to be built. If images are necessary to convey this precisely, make sure to include image descriptions, so everyone can see what is in the image. Do not link to external documents; everything should be embedded here. Once the design is approved, we will remove the needs design tag and replace it with the buildable tag, signalling that it can be built.