Adding ARIA/Jaws compatibility to HTML4 site

65 views
Skip to first unread message

Joop Kaashoek

unread,
Dec 12, 2015, 9:10:17 AM12/12/15
to Free ARIA Community
We need to add ARAI/Jaws compatibility to our site with is set up with HTML4. For various reasons converting to HTML5 is a problem (mainly the differing table behavior) So is it possible to add ARIA compatibility to our HTML4 site, with Javascript?

Benjamin Hawkes-Lewis

unread,
Dec 13, 2015, 5:55:46 AM12/13/15
to Free ARIA Community
On Sat, 12 Dec 2015 at 14:10, Joop Kaashoek <jckaa...@gmail.com> wrote:
> We need to add ARAI/Jaws compatibility to our site with is set up with HTML4. For various reasons converting to HTML5 is a problem (mainly the differing table behavior) So is it possible to add ARIA compatibility to our HTML4 site, with Javascript?

You can add ARIA attributes (like any other HTML attributes) to an
HTML document with JavaScript. However, it's likely to work better if
elements are decorated with the appropriate ARIA attributes before
they are parsed from markup or added with JavaScript to the document,
since otherwise assistive technologies like JAWS might "cache" the
undecorated state. If your site works without JavaScript, then adding
ARIA attributes to the raw markup also means that users with
JavaScript disabled can benefit from them.

Note that browsers and assistive technologies do not treat documents
self-declared as HTML4 differently to documents self-declared as
HTML5. Instead, HTML5 specifies how client software should process any
HTML document, whatever its declared version.

I'm not sure what you meant by "differing table behavior".

Are you talking about tables being rendered different visually? Some
doctype declarations, including some but not all of the HTML doctype
declarations, trigger different rendering behavior and this can affect
table display. "Activating Browser Modes with Doctype" (see
https://hsivonen.fi/doctype/) discusses which common doctypes trigger
which rendering mode. The implementation of these rendering modes and
author reliance upon them was never compliant with the HTML4 era web
specifications, but both the triggers and the details of the modes
have now been specified in the HTML5 era. More critically, to ease the
transition from HTML4, the HTML5 specification for doctype (see
http://www.w3.org/TR/html5/syntax.html#the-doctype) allows authors to
declare certain legacy doctypes, perhaps to keep the alternate
rendering behavior while still validating their use of new HTML5
features elsewhere in the same markup.

Are you talking HTML5 obsoleting the "summary" attribute? This causes
validators to emit a warning when "summary" is used, and authors are
recommended to use other mechanisms to describe tables (see
http://www.w3.org/TR/html5/tabular-data.html#table-descriptions-techniques),
but declaring your document as HTML5 but still including "summary"
attributes will not change how client technologies process those
attributes.

Hope that helps.

--
Benjamin Hawkes-Lewis

New Vision

unread,
Dec 15, 2015, 8:41:28 AM12/15/15
to Free ARIA Community
I don't think adding the ARIA will hurt anything. Even if its HTML4. I ran a webapp on that was compatible with iOS 5 that used tons of ARIA properties. Even though HTML5 wasn't fully ratified yet or even all its supposed features adopted by Apple. I didn't get to use all the ARIA tools but enough to make things function well. HTML is generally designed to gracefully degrade if functionallity is lacking so I'm a bit suprised that your User-Agent or Client system is having trouble with it. If your locked in to a very specific User-Agent limitation you might try and experiment like I had too with iOS back in the day and see if the ARIA tags work effectively. Maybe some other could advise you but I'd imagine you could use ALT properities side by side with ALT properities and it wouldn't hurt anything. Using AJAX can be tricing but do-able too.  But if your dealing with some odd-ball User-agent like IE 6 or something you might use want to split your site using an htaccess filter to send certain user-agents to a different landing page. Might help you going forward when you need to shed the dead weight of backwards compatiblility; then again you could just use a on-demand style of JS to load a compatibilty library when needed. Just some thoughts I'm a novice dev. -David
Reply all
Reply to author
Forward
0 new messages