Esri / arcgis-maps-sdk-swift-samples

SwiftUI samples demonstrating various capabilities of ArcGIS Maps SDK for Swift
https://developers.arcgis.com/swift
Apache License 2.0
31 stars 10 forks source link

Don't include "Enabled" in the toggle's label #321

Open yo1995 opened 11 months ago

yo1995 commented 11 months ago

See https://github.com/Esri/arcgis-maps-sdk-swift-samples/pull/318#issuecomment-1857396923

Samples to fix:

image
CalebRas commented 11 months ago

I should clarify that in most (if not all) cases, Enabled shouldn't be needed as a suffix. While I couldn't find any explicit recommendations in the HIG, a cursory glance at how switches are used in iOS shows that toggle labels typically do not include the state as part of the label. The state is a function of the switch itself and including it in the label is odd, especially for VoiceOver. If it must be included in the label, it should be static, ie. it shouldn't change depending on the label's state.

On Mac Catalyst, a toggle in a toolbar using the default formatting appears as a plain button with no dynamic indication of whether it is enabled/disabled. Using a dynamic suffix was the best idea I could come up with to remedy this. I agree, though, that it is probably not an optimal solution. Do you have any other ideas, or do you recommend just leaving the buttons static? @philium

https://github.com/Esri/arcgis-maps-sdk-swift-samples/assets/34120440/d79c9e7f-833b-4ee3-b550-5aafebfb46dc