4 ms·
Please God no. It's awful for accessibility. What's on? What's off? Or is it left or right? Or something else? Also fun times when someone starts using gray for
by 38 3y ago
Please God no. It's awful for accessibility. What's on? What's off? Or is it left or right? Or something else? Also fun times when someone starts using gray for the element color (I've seen that in production).
It's inventing a square wheel, when a round wheel already exists.
- pilif 3y agoThe control reflects how the equivalent of checkboxes look on mobile devices in native apps. So this is a great way to get to use the same control as the rest of the OS uses without having to implement it yourself in CSS and JS. This means that as the OS changes, this control will adapt, including accessibility affordances like showing a 0 or 1 on the control to denote state. I see why you don’t like the control, but this is what mobile OSes use (mainly because a checkbox the size required for a finger to hit comfortably would look ridiculous) and what users are now used to and what many websites in their mobile modes are emulating and not getting quite right. Being able to have access to the native control is a huge benefit I think.
- phkahler 3y agoDone right, a checkbox should toggle when you touch the label as well. No need for a giant box.
- jsjohnst 3y ago> It's awful for accessibility. What's on? What's off? There’s an accessibility mode where it says literally on and off as appropriate. It follows the same behavior as native controls on the same platform, including aria behavior. Want to spread more fud?
- phkahler 3y agoThis was just discussed in several HN topics. Is "on" the current state, or what happens if you flip the switch? It's not obvious. Checkboxes are obvious.
- djbusby 3y agoReal life switch shows it's current state (eg: light switch, up for on (and some even have little text showing ON when on)). Like a checkbox shows it's current state.
- kube-system 3y agoNot that I disagree with you, but: > up for on .. is regionally specific. e.g. in some places, you turn on lights in a house by flipping the switch down.
- pjerem 3y agoIn my house, it’s random. Not because there is no standard around here (I live in the EU, The Holy Land Of The Mandatory Standards) but because it looks like the previous owners didn’t care enough. More seriously, it also depends if there is only one switch for the light. If there is two nothing makes sense anymore and if there is more, you are forced to use a relay so switches become one state buttons.
- Izkata 3y agoI didn't know anyone had any standard until a conversation on here where it came up a year or two ago. Every place I've lived had two switches somewhere (both ends of a hallway, both entrances to a room, etc) so I never internalized any directionality for switches - it's just always been "flip the switch if the light is in the wrong state". One or two of the switches I've had have even been sideways.
- riffraff 3y agoI've seen plenty of rooms with more than one switch, where it acts like a toggle, so "on" can be up or down. There is no standard.
- djbusby 3y agoSure, be pedantic. But look around, loads of switches in the real world show their current state. Hair Dryer, Stove, A/C. Mostly, toggle switches and dials show the current state. (And sure, 3x and 4x lighting circuits exist)
- deleted 3y ago[deleted]