How do you detect a screen reader?

The short answer is that you can’t. At the time of writing there isn’t a way to reliably detect whether someone visiting your site is using a screen reader (or screen magnifier). You might have heard that Flash will do the trick, but that might not be quite the solution you’re expecting.