CyberStars

HTML Recap

No new theory, just a challenge that uses the HTML of this part: real buttons, not ARIA, buttons that say they are pressed, and icons only for the eye.

Some visitors feel sick when things move on a screen. The settings page should let them ask for less movement. The animations come later in this part. Today, the buttons.


Mission: Less motion

What you will see: under the theme part, a part with a heading like "Motion", a sentence about it, and two buttons, ✦ Full and ◌ Less. Full is pressed, and looks pressed, like the System button.

  • After the theme part, add a new part with its own heading.
  • In it, add a box with the id motion-buttons.
  • The box holds two real buttons that send no form: motion-full, which says Full, and motion-less, which says Less.
  • Full says it's pressed, and Less says it isn't, the way a screen reader understands.
  • Each button has an icon before its word, which a screen reader skips. You choose the icons.
  • The pressed button looks different from the other one.
  • Both are easy to read, with a contrast of at least 4.5.

The pressed look of the theme buttons can count for these buttons too.