diff options
| author | Oliver <oliver@mohlin.dev> | 2025-09-03 08:13:14 +0200 |
|---|---|---|
| committer | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2025-09-22 12:35:43 +0200 |
| commit | a364a1c5714921fcb519f7c63ef0ee25de31f78e (patch) | |
| tree | f9516048d2fef33c6a95aaa2b22d9344b83723f9 | |
| parent | 9dfc5b9147e388f6c01708511830a77fa08a19d4 (diff) | |
| download | mullvadvpn-a364a1c5714921fcb519f7c63ef0ee25de31f78e.tar.xz mullvadvpn-a364a1c5714921fcb519f7c63ef0ee25de31f78e.zip | |
Add aria-describedby to custom dns toggle
| -rw-r--r-- | desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/custom-dns-settings/CustomDnsSettings.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/custom-dns-settings/CustomDnsSettings.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/custom-dns-settings/CustomDnsSettings.tsx index 4bbd7a6ebc..41d2fd618f 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/custom-dns-settings/CustomDnsSettings.tsx +++ b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/custom-dns-settings/CustomDnsSettings.tsx @@ -37,6 +37,7 @@ export function CustomDnsSettings() { const willShowConfirmationDialog = useRef(false); const { ref, animation } = useScrollToListItem('custom-dns-settings'); + const descriptionId = React.useId(); const featureAvailable = useMemo( () => @@ -198,7 +199,7 @@ export function CustomDnsSettings() { <ToggleListItem.Label> {messages.pgettext('vpn-settings-view', 'Use custom DNS server')} </ToggleListItem.Label> - <ToggleListItem.Switch ref={switchRef} /> + <ToggleListItem.Switch ref={switchRef} aria-describedby={descriptionId} /> </ToggleListItem> <Accordion expanded={listExpanded} disabled={!featureAvailable}> <Accordion.Content> @@ -251,7 +252,7 @@ export function CustomDnsSettings() { </Accordion> <StyledCustomDnsFooter> - <Cell.CellFooterText> + <Cell.CellFooterText id={descriptionId}> {featureAvailable ? messages.pgettext('vpn-settings-view', 'Enable to add at least one DNS server.') : formatHtml( |
