For adjusting brightness, it's common to use an input element with type="range", so let's give it a try.

Make sure to type type="range".