ASP.NET MVC - How to detect if user is using a screen reader

后端 未结 3 516
名媛妹妹
名媛妹妹 2021-01-22 15:52

So I\'m currently trying to check if a user is using a screen reader on our site. The reason I would like to check if they are is because our site provides a training module in

3条回答
  •  甜味超标
    2021-01-22 16:36

    The HttpRequest.Browser property returns a HttpBrowserCapabilities object that enlists the capabilities of the device that has made the request. Bear in mind that ASP.NET uses the User-Agent string sent as part of the HTTP request to identify a client. Then to populate the HttpBrowserCapabilities properties, ASP.NET processes the user-agent string using a set of pre-installed browser files, which are contained in the following location: %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\CONFIG\Browsers

    HttpBrowserCapabilities Class

    There are also third-parties which are far more detailed and updated with detecting device info, i.e. 51Degrees

提交回复
热议问题