Radio buttons simulated using CSS
Radio buttons are form elements that allow the user to select one unique option among a group of possible options.
Radio buttons are “simulated using CSS” when they are not built using the standard HTML code for radio buttons as found in the specification
<input type="radio" /> but the standard radio buttons are visually hidden and replaced with CSS images, icon fonts, or specific styles.
There are several ways of achieving this. The example below shows how to simulate radio buttons using CSS pseudo-elements and background images, while retaining their accessibility.
Core HTML base
In the CSS, background images are then placed correctly over the radio buttons. For example:
Examples of components
The following components are proposed here because their level of accessibility is considered good or very good.
However, before using them in your project, it is important to check that the specifications presented above have been respected. Depending on the version used, the components may need some adjustments before they can be used in your project.