Accessibility: faccessibility of moodle and earning code

Accessibility: faccessibility of moodle and earning code

by Chris Westbrook -
Number of replies: 6
I am an IT major on a committee considering using moodle at our university.  I am also totally blind, and one of the things I'm looking at is moodle from an accessibility perspective.  I see some errors in the html that would improve accessibility if they were fixed, but I can't figure out how to find the html code burried in the php code to modify.  Is there somewhere that all variables are explained?  I saw the cross reference utility, but that just shows where variables are located, not what they do.  Is anyone working on compliance with web standards/accessibility?  I'd love to help out if I can.  I suspect the people working on that, if there are any, probably don't have knowledge of how our screen readers work or the ability to test their work using one.  Thanks for any feedback.
Average of ratings: -
In reply to Chris Westbrook

Re: Accessibility: faccessibility of moodle and earning code

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Chris, I'll mail you directly as well in case you don't find this, but the answer is yes, we are very keenly working on accessibility and I would very much like to have your feedback on the issue.  Feel free to post more here in this discussion.
In reply to Martin Dougiamas

Re: Accessibility: faccessibility of moodle and earning code

by Chris Westbrook -

You don't have to bother emailing me, I'm already subscribed to the forum.  I'll post some feedback when I'm a bit more awake...

In reply to Chris Westbrook

Re: Accessibility: faccessibility of moodle and earning code

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Great day to get something rolling in that area smile

http://www.worldusabilityday.org/
In reply to koen roggemans

prelininary feedback Re: faccessibility of moodle and earning code

by Chris Westbrook -

I'm going to list some errors I generally see throughout the site.  I'm not sure how helpful this message is going to be, since I'm going to try to put html in here that I don't want turned into html because I want you to see how it needs to be modified.  If there's a setting I can change to tell it to leave my message alone and simply post as is, let me know and I'll repost.  I'm saving a copy on my hard drive, so that will be know big deal.  Probably the worst problem I've seen in moodle is your use of title and alt attributes.  I'm going to paste the code taken directly from a moodle page that I'll use as an example.
<a href="view.php?id=2&amp;week=1" title="Show only week 1"><img src="http://localhost/moodle/pix/i/one.gif" height="16" width="16" border="0" alt="" /></a>
I notice a lot of links are set up using the same convention.  I know what you're hoping.  You're hoping Jaws will read the title of the link and ignore the picture.  Unfortunately, it doesn't work that way.  If your picture was a stand alone graphic, putting alt="" would make Jaws ignore it by default.  But, unfortunately, because it is part of a link, Jaws feels it has to read the text between the <a> and </a> tags.  Finding no alt attribute, Jaws (and most assistive technologies) will simply read the file name of the graphic.  Not very helpful.  The solution is to put the text of the title attribute in the alt attribute.  So the modified code would be
<a href="view.php?id=2&amp;week=1" title="Show only week 1"><img src="http://localhost/moodle/pix/i/one.gif" height="16" width="16" border="0" alt="Show only week 1" /></a>
For those of you who are using Jaws, there is a workaround until that is implemented.  Go into the verbosity settings and set the links with text only to title.  Reply here if you want me to go into more detail on how that is done.  Unfortunately, I can't speak for other screen readers, and suspect those won't have a workaround.  Another issue I have seen is your use of alt attributes on form fields.  Sorry, but that won't work.  Alt attributes are only for images and image map links, which I suppose are just parts of images.  In order to label form fields, you must use the label tag.  The label tag is wrapped around the text on the page which most accurately labels the control.  It takes one attribute called for, which contains the id attribute of the control you are trying to label.  Here's an example.
<label for="search">search the site</label>
<input type="text" name="searchvalue" id="search"/>
The text inside the label tags, search the site, will still be displayed on the screen, so the idea is to put the label tag around text that is already on the screen that should be associated with each field.  This should be done for every type of control accept buttons, since with buttons the assistive technology will simply read the value attribute.
Finally, I've noticed that you use a link that appears to lead to nowhere, I'm assuming as some kind of divider.
<a href="#" onclick="elementToggleHide(this, true, function(el) {return findParentNode(el, 'DIV', 'sideblock'); } ); return false;"><img src="http://localhost/moodle/pix/spacer.gif" alt="" class="hide-show-image" /></a>
Does that link have any purpose, or is it some kind of cecoration.  I'm assuming it must have a purpose, otherwise it wouldn't be a link, but I'm at a loss as to what that would be.  It doesn't seem to do anything when I hit enter on it.  I think that's enough to get you started for now.  Let me know if you have any questions or if you want me to test stuff.

Average of ratings:Useful (1)
In reply to Chris Westbrook

Re: preliminary feedback Re: accessibility of moodle

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Chris,

Thanks for your feedback - most valuable.

Regarding empty alt attributes, please check bug 4012. It's classified as low priority because nobody realised the problem with screen readers. I hope your feedback will result in it being fixed soon.

In reply to Chris Westbrook

Re: prelininary feedback Re: faccessibility of moodle and earning code

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Chris,

The link that you mention that appears to lead to nowhere is actually a hide/show side blocks feature which uses Javascript and cookies to remember the state of each collapsible block and only affects the user's own view. It may be enabled/disabled by the site admin. Have you any suggestions regarding the link?