Note: You are currently viewing documentation for Moodle 3.11. Up-to-date documentation for the latest stable version of Moodle may be available here: Unobtrusive Javascript.

Development:Unobtrusive Javascript

From MoodleDocs
Revision as of 09:53, 30 July 2006 by David Scotson (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Unobtrusive Javascript is a new approach to adding enhanced functionality to web pages with Javascript. It follows the lead of CSS, which allowed styling to be extracted from HTML into a seperate layer, by moving Javascript out of the main HTML document and assigning it via structural hooks. This leads to more readable, maintainable and re-usable code.

Unobtrusve Javascript in Moodle

Moodle now supports the Yahoo! user interface library which includes unobstrusive javascript as one of its primary design goals (along with Progressive enhancement and Hijax).

Unobtrusive Javascript and Accessibility

Javascript, and particularly AJAX, are often seen as incompatible with the goals of Accessibility but as long as the various related best practice are followed then the opposite is the case and these technologies can make web apps more usable and accessible. Unobstrusive javascript can certainly aid this process, though use by itself does not guarantee accessibility.

See also