Skip to content
Nazmul Nikhil
Menu

ARIA Toggle Fields Do Not Have Accessible Names (PageSpeed Insights)

PageSpeed flags custom switches and checkboxes (role="switch", "checkbox", "radio") with no label, like dark-mode toggles. Here's how to name them.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
ARIA Toggle Fields Do Not Have Accessible Names (PageSpeed Insights)
Photo: Edge2Edge Media on Unsplash

In short

Custom toggles built with role="switch", checkbox, radio or menuitemcheckbox need a name, or users hear only "switch, off." Add aria-label or link a visible label. Weight 7.

<button role="switch" aria-checked="false" aria-label="Dark mode"></button>

This guide isn't affiliated with or endorsed by Google.

Sources and references

TAGSPageSpeed InsightsAria toggle field accessible nameAria-toggle-field-nameSwitch role label
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Page Speed & Core Web Vitals posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com