Re: Accessibility: faccessibility of moodle and earning code
Re: Accessibility: faccessibility of moodle and earning code
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...
Re: Accessibility: faccessibility of moodle and earning code
prelininary feedback Re: faccessibility of moodle and earning code
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&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&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.
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.
Re: prelininary feedback Re: faccessibility of moodle and earning code
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?