Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: About Accessibility  (Read 1876 times)


  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
About Accessibility
« on: June 27, 2008, 06:06:39 pm »

I'm trying to make website with accessibility guidelines.

I notice some little missing in the Doctype and in the search form function.

A correct Doctype should describe the language used like this :
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" lang="en" xml:lang="en">
I just add lang="your language" and xml:lang="your language"

Next in snews.php in search form I put a "label" tag in the search form.
Replace the search form function by this one.

Code: [Select]
function searchform() { ?>
<form id="search_engine" method="post" action="<?php echo db('website'); ?>" accept-charset="<?php echo s('charset');?>">
<p><label for="keywords"><?php echo l('search_label'); ?></label><input class="searchfield" name="search_query" type="text" id="keywords" value="<?php echo l('search_keywords'); ?>" onfocus="document.forms['search_engine'].keywords.value='';" onblur="if (document.forms['search_engine'].keywords.value == '') document.forms['search_engine'].keywords.value='<?php echo l('search_keywords'); ?>';" />
<input class="searchbutton" name="submit" type="submit" value="<?php echo l('search_button')?>" /></p>
<?php }

Then ad a language variable in the top of snews in Search area (#search). I also change the search_keywords variable.

Code: [Select]
$l['search_label'] = 'Search website ';
$l['search_keywords'] = 'Keywords';

For translation file just put your own translation here
For French I just put :

Code: [Select]
$l['search_label'] = 'Recherchez sur le site ';
$l['search_keywords'] = 'mots cl&eacute;s';

Maybe this is useful for someone.