3 ms·
Yes, the First Rule of ARIA Use is first for a reason. [0] Also for styling, visually hiding the <input type="radio"> and using a custom radio-like icon with i
by extra88 7y ago
Yes, the First Rule of ARIA Use is first for a reason. [0]
Also for styling, visually hiding the <input type="radio"> and using a custom radio-like icon with its associated <label> can be a decent option. Use a CSS selector like this to "check" an icon with the label: #radio1:checked + label::before
[0] https://www.w3.org/TR/using-aria/#rule1 https://www.w3.org/TR/using-aria/#rule1
- runarberg 7y agoYes the `input[type="radio"]:checked + label::before` selector was for sure used a lot in the past for greater browser compatibility. But in 2019 I think it is safe to style the radio element directly along with vendor prefixed `appearance: none;` possibly inside an `@supports` rule so that IE users will fall back to the native style while users of modern browsers get a custom style.