Button > Make use of aria-pressed

Problem

It isn't clear if a "selected" button should only be styled like it's selected, or use aria-pressed.

Solution

Document the difference between a selected style and aria-pressed and consider when they could be used in conjunction, or extend the .selected class to the aria-pressed attribute.

Update the stories to account for the above.

  • aria-pressed is ideal for a toggle button. The resulting button should leverage the selected styles when aria-pressed="true".
  • A .selected style can be applied to a button that represents the current UI, even though the button can still be enabled.
Edited by Jeremy Elder