Hi tee On 26/03/2011, at 4:50 PM, tee <[email protected]> wrote:
> I have a small login popup box, and is using Ajax fetch to pull in the login > page. Due to the way the system works, the login page default is to use a > page template instead of just the chunk of login code placed in a header or > left/right column, though can be done too but my view is that the login code > shouldn't be in every page since it's to be showed in a modal window so I > want it retrieves via Ajax. > > I created a template, strip out dtd, body and all other areas except the > code that retrieves the content area (where it will then load the login code > template), this all works well. My concern is, will it be any problem for > screen reader read the login page's info, enter email which the page has no > dtd, body and html tags? I can't answer your question directly, but this is a familiar scenario in which you have some alternative approaches available to you could employ. Is your concern for when and if the login page is loaded directly rather than via Ajax? Rather than stripping the page elements from your login page make two versions of the form: One designed to be viewed as a standalone page (complete with page elements); And another that only includes the login form portion you wish to load with Ajax. Link to the first in your page in your HTML and use JavaScript to load the other instead when the link is clicked. Alternatively, keep your login page as one file designed to be viewed independently, and use JavaScript to strip out the unneeded elements before inserting the form into your page. This is really easy with jQuery. The load method allows you to append the URL to the page you wish to load with a selector for the portion of the the requested page you wish to insert (with a space to separate them) eg: "login.html #loginform" where “lo inform” is an id on an element that contains your form. JQuery discards the rest. Note that the whole page is loaded even if it is not displayed so if you have a lot of navigation or unrelated markup in your page this approach may be slower to load even if it is otherwise elegant. Broadly the term Hijax is an appealing title for this if you are looking for more on it. I should also point out I have not tested the accessibility of a form loaded into a page in this manner, so I cannot comment on how it might behave in a screen reader.</disclaimer> hth Ollie -- @ollicle ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [email protected] *******************************************************************
