varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.53k stars 68 forks source link

Improve accesibility via adding content to the label #537

Closed carlosgub closed 4 months ago

carlosgub commented 4 months ago

This pull request addresses an accessibility issue identified using the Lighthouse tool. The problem occurs due to the Switch Component lacking a proper label that describes the input used as a switch.

To resolve this, I added the modifier arialLabel to the Input Component. This solution I get it from here aria-label accesibility

You can see similar problems discussed in the following links:

Deque University: Accessibility Rule - Ensure every form element has a label