Welcome to WebmasterWorld Guest from 54.226.147.190

Forum Moderators: ergophobe

Message Too Old, No Replies

Detecting Screen Readers

Capability Check?

     

cmarshall

8:59 pm on Jun 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have this really kewl site. It will have all kinds of AJAX bells and whistles, etc.

I have a second path for browsers that can't handle AJAX or have scripting disabled. This path offers an experience almost as good as the fancy one, but without things like Google Maps and the all-important throbber.

What I want to know is if there is a way to ensure that screen readers always get sent down the non-AJAX path. From the various discussions here, it looks like screen readers bravely try to render AJAX, and fall down.

As I said, I've tested without any bells and whistles, scripting disabled, old browsers, etc. They all get sent down the non-AJAX primrose path.

However, I would be crushed if my disabled users tried to go down the fancy (non-accessible) path.

Is there some capability or UA flag that I can use to detect screen readers as a general category?

I also have the capability of generating RSS and WML pages (I use XSLT), so it may even be better to send them that ways.

Is there an accept-type or something I can use?

lavazza

12:19 am on Jun 27, 2007 (gmt 0)

5+ Year Member



[w3.org...]

The @media construct allows style sheet rules for various media in the same style sheet

cmarshall

12:41 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks!

However, that won't solve my dilemma. I need to send the reader to a different rendering of the page. I could show you how it works, but we can't do that here (No links TOS).

Basically, if you hit the page with a JavaScript-AJAX capable browser, you get a dynamic page with in-place content display. If you hit it without, the page needs to reload each time, but the content looks very similar. CSS won't give me that.

I still need to work on making the AJAX a bit more accessible, but, even then, it won't be that good.

The non-AJAX version will be fine. I just need to make sure that screen readers get that, as opposed to the dynamic version.

lavazza

1:17 am on Jun 27, 2007 (gmt 0)

5+ Year Member



I need to send the reader to a different rendering of the page

Ummm... that's how it works... ONE centralised source of content with class declarations handling how the content is (or is not) presented in a variety of media

Or have I missed your point?

cmarshall

1:21 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, but that's OK. It's a murky point.

The page is rendered differently by executing different active content (PHP, XSLT and JavaScript). CSS won't allow me to specify this. It will only control visibility of content that is already there. I need to generate completely different content each time.

vincevincevince

2:05 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Can you provide both sets of content, the accessible one first, and use your alternative CSS versions to hide one or the other entirely?

cmarshall

2:36 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you provide both sets of content, the accessible one first, and use your alternative CSS versions to hide one or the other entirely?

Not without serious cost. It's an event search that uses PHP to XSLT an XML feed from another server. It can be pretty time-consuming. The lists can get very long, and it can take ten seconds or more to finish a request.

I need to commit to a path before sending the request to the other server. The AJAX path renders the page, then fills in the list after being fetched. The non-AJAX path delays rendering the page until it gets the rendered XSLT, so that means I can't redesign the delivery without incurring serious usability costs to the 90% of users that have AJAX-aware browsers.

That's why I want to make sure the proper path is executed.

Marshall

3:28 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



cmarshall,

Couldn't you have one version load in a visible <div> and the other in a hidden <div> then have some script that toggles which one to display. I assume this would work.

Marshall

cmarshall

10:23 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's the problem. I can't. Each load brings in beaucoup content, and takes quite some time. I guess I could store the content and output it twice, thus saving the time it takes to go and fetch the feed, but then, I'd be feeding a lot of data to 90% of the users for 10% of the users.

I just measured the Brooklyn dump, and it's 370K. I don't want to give everyone 700K, just so a few of them can see it. I just want to make sure that the correct 370K gets sent to the browser.

Marshall

10:31 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am sure there has got to be a simple way but it escapes just now. Busy working on my own site :) I'll keep thinking about it.

Marshall

vincevincevince

10:57 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member



First link on the page 'go to accessible version'... follow the link see the accessible version. If you want to keep the same URL, then just send a get argument on the end.

Marshall

11:15 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can't you use a <link rel... />?

cmarshall

11:53 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First link on the page 'go to accessible version'... follow the link see the accessible version. If you want to keep the same URL, then just send a get argument on the end.

That's something to consider. I think maybe Marshall's <link /> idea may be the best way to do this (the site framework is WordPress, so I only have limited interaction between the list -which is a WP plugin- and the theme header.php, which is where either of these solutions would be implemented.)

However, I also seem to remember reading on this forum somewhere that links like that are considered rude.

The most polite way would be to handle it in exactly the same manner as I do non-AJAX browsers: Just send them static XHTML. The entire structure is already there. I just need to figure out how to send the browser to the correct code.

Thinking back on the CSS solution, I'm wondering if there is a way to implement a screen reader class, then check it in JavaScript. If the class is active, then I send the browser to the non-AJAX path. From what I understand, all screen readers can execute JavaScript. I remember a discussion along these lines for printer styles, and they concluded it couldn't be done. However, we have different rules here...

Marshall

11:58 am on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



cmarshall,

Links like what are considered rude?

Marshall

cmarshall

12:09 pm on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I apologize, bad choice of words.

Links that require an extra action on the part of the visitor (skipnav, for example). The page should just plain render they way it's supposed to, with no intercession by the user.

This was why I like your idea, because these head tags are usually executed by the browser automatically. I'm just not sure if the reader would be able to use it.

Marshall

12:12 pm on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Run a test page if you can.

Marshall

cmarshall

12:17 pm on Jun 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, there's not gonna be a quick and easy solution. I could always check UAs, but that is sort of the least palatable way to do it, as I would have to keep updating it for new browsers.

I wonder if there is a WURFL [wurfl.sourceforge.net] for screen readers?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month