Latest Post

How to Play the Game of Poker Best Practices for Making Accessible Toggles

Toggle is a control that is typically used for on/off or binary actions. It is a better choice than a checkbox when users need to quickly flip a setting between two possible states. It also takes up less screen real estate than two radio buttons. However, toggles can create cognitive problems when they are not used well and can lead to the user misinterpreting the current state of a setting.

For example, using a red toggle to indicate “on” may be counterintuitive for users with color blindness. Designers should take these issues into account when adding features that use toggles. A better alternative is a button> with the aria-pressed attribute if it’s important for users to know when a toggle has been clicked.

Savvy teams often view feature flags as inventory with a carrying cost, and seek to minimize the number of toggles in their codebase. As such, it’s a good idea to have a process in place to remove toggles once they have been tested and found to be no longer needed. Some teams even put expiration dates on their toggles, ensuring that they are not left behind in production for too long.

Whether you are implementing a new feature in the web app, doing a gradual rollout or just experimenting with an idea, Split makes it easy to attribute insightful data to each and every toggle. To get started, sign up for a free trial or schedule a demo with our team.