Showing posts from December, 2012

Accessible “Read More” Links

When there are a bunch of “read more” links on a page, it is usually fairly obvious from visual cues what the “read more” refers to. However, when screen reader users encounter a bunch of “read more” links on a page, it is not always obvious which part of the page each “read more” link refers to. A simple solution is to use a bit more descriptive text than simply “read more” and use CSS to hide the additional text. In this example the following code is used.

<p><a href="#">Read more <span class="offscreen">About NC State</span></a></p> This is the CSS rule.

.offscreen { position:absolute; left:-999px; width:1px; height:1px; top:auto; } Notes:
The off-screen text needs to be included in the <a> as well, otherwise it won’t be read correctly by screen readers.You cannot use the CSS rule display:none or visibility:hidden as that will make the content invisible to screen reader users.This code is not unique to me. It i…

Autocomplete off - (Custom Module)

'Autocomplete off' Module work on these forms - user login, user profile, user_register, user_pass.

Download Module

Form Autocomplete off

function autocomplete_form_user_login_alter(&$form, &$form_state) {
$form['#attributes']['autocomplete'] = 'off';

Web Accessibility Evaluation Tools & Links

Clear cache URL or menu link

Create a new page, with the input filter set to a filter that can run PHP. Then use the following snippet, which was shamelessly yanked from devel.module:
* 2008 Jun 26
* The code submitted by dharmanerd in his comment probably
* works better than the original I had, so I've modified this
* to match his code.
* The original code for this was shamelessly yanked from
* `devel.module`; it was the function `devel_cache_clear()`.

// only allow site administrators to visit this page:if (!user_access('administer site configuration')) {
else {
$tables = array(
  foreach ($tables as $table) {
cache_clear_all('*', $table, TRUE);
drupal_set_message('Cache cleared.');
}?> Set a URL path for this page (perhaps 'cache_clear') so that you can clear the ca…