Transport

Previous, play or pause in an accent ring, next. These are the controls of anything that plays.

Part of a music window: the song Undertow in large type, the artist Mara Velde, a waveform played to a little over a third, the times 1:54 and 5:01, and below it previous, a ring with the pause symbol, and next.

Use it for one thing that plays: a song, a recording, a video. It has the three controls and nothing more. The ring is the one primary action on the page, so it is the one place the accent draws a line.

Anatomy

The transport at one and a half times its size. Callouts name the previous button, the ring, the play symbol inside it and the next button.
The transport at 1.5 times its size.
  1. PreviousAn icon button, half the transport's size.
  2. Play or pause symbolplay_arrow while stopped and pause while playing, half the ring's size, in the main ink.
  3. Ring2 pixels in the accent at 80 %, as wide as size.
  4. NextAs previous.

States

The transport five times at the small size, numbered: at rest, pointer over the ring, the ring pressed, the keyboard ring, and playing with the pause symbol.
One column for each state of the ring.
  1. RestThe ring empty.
  2. Pointer over itThe hover wash inside the ring.
  3. PressedThe ring shrinks a little while held and comes back.
  4. Keyboard focusThe ring around the ring, round.
  5. PlayingThe pause symbol; playing is the app's to set.

A side button with nothing to go to (canPrevious or canNext false) is an icon button that is not enabled: its symbol in the faint ink, with no response and no stop for Tab.

Sizes

Two transports: one with a ring of 64 pixels, for a stage page, and one with a ring of 40, for a player bar, each ring measured above it.
The two sizes in use.
PartAt 64At 40
Ring6440
Symbols3220
Side buttons (hit area)5136
Space between the three2214

size is the ring's width. The symbols are half of it, the space is 35 % of it, and a side button is never under 36, so it stays easy to hit.

Keys and pointer

The previous button, the ring and the next button are each a stop for Tab, except a side button that is not enabled.

Do thisTo
Enter or Space on the ringPlay or pause
Click the ringPlay or pause
Enter or Space on a side button, or a clickPrevious, or next

Play and pause on Space anywhere in the window belongs to the app, not to this part.

Accessibility

Writing

The transport has no words. Put the title and the artist beside or above it, and the times on a waveform or a slider.

Do and don't

A song title above a transport with one ring around the play symbol.
DoKeep one accent ring, on play and pause.
Three controls, previous, play and next, each in its own accent ring.
Don'tRing all three. The page then has three primary actions and none stands out.

Code

import Tacit.Kit

Transport {
    size: 64                               // 40 in a player bar
    playing: player.playing
    canPrevious: player.index > 0
    canNext: player.index < player.count - 1
    onPrevious: player.previous()
    onPlayPause: player.toggle()
    onNext: player.next()
}
PropertyWhat it does
sizeThe ring's width: 64 on a stage page, 40 in a player bar
playingShows the pause symbol
canPrevious, canNextTurn the side buttons off
previous(), playPause(), next()What the person asked for
labelWhat a screen reader calls the controls ("Playback")

Experimental, in Tacit.Kit 0.1.