semanticLabel property

String? semanticLabel
final

The semantic label for screen readers.

When null, the switch has no name of its own (screen readers already announce it as a switch). Name it here, or merge it into the row whose title names it, which reads as a single switch:

MergeSemantics(
  child: GlassListTile(
    title: const Text('Wi-Fi'),
    trailing: GlassSwitch(value: wifi, onChanged: setWifi),
  ),
)

Leave the tile's onTap unset there: a tile with onTap is a button, and macOS reads a button before a switch.

Implementation

final String? semanticLabel;