Kategori
Web Accessibility

The First Menu is not Skip to Main Content

Diperbarui 25 Agustus 2010 oleh Dani Iswara

I am not sure with this post. While using text-based browsers, the first link is not 'Skip to Main Content' menu. What should we do to be able to jump to the content directly?

In WordPress blog header, we have <?php wp_head(); ?> hook. Based on /wp-includes/default-filters.php file in WordPress 2.9.2, the hook has these features:

...
// Actions
add_action( 'wp_head', 'wp_enqueue_scripts', 1 );
add_action( 'wp_head', 'feed_links_extra', 3 );
add_action( 'wp_head', 'rsd_link' );
add_action( 'wp_head', 'wlwmanifest_link' );
add_action( 'wp_head', 'index_rel_link' );
add_action( 'wp_head', 'parent_post_rel_link', 10, 0 );
add_action( 'wp_head', 'start_post_rel_link', 10, 0 );
add_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 );
add_action( 'wp_head', 'locale_stylesheet' );
add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
add_action( 'wp_head', 'noindex', 1 );
add_action( 'wp_head', 'wp_print_styles', 8 );
add_action( 'wp_head', 'wp_print_head_scripts', 9 );
add_action( 'wp_head', 'wp_generator' );
add_action( 'wp_head', 'rel_canonical' );
add_action( 'wp_footer', 'wp_print_footer_scripts' );
...

To counter the add_action, I usually use remove_action in function.php file. Imagine a WordPress blog which has a lot of posts, archives, feed links, and some other relationship links. Hits (down arrow) key many times? Nightmare for text-based browser users.

There are accesskey (read it in Wikipedia), right? True, but it still has lack of support.

Using rel element

Googling for a while, I found this old document, HTML resource element in W3C page. But, it only tells about how to refer to a different resources of a Web document.

In another term, the Web Slice:

…is based on the hAtom Microformat World Wide Web link, with a few additional properties. The Web Slice itself uses simple, semantic HTML markup to represent a portion of Web page that can be subscribed to. Annotations can be applied directly to content within the HTML page; additional files can be used for optimization, but are optional.

A Web Slice has four major features:

  • Discovery.
  • Update.
  • Preview.
  • Navigation.

Source: Microsoft website.

I think it has the same feature as W3C above. No specific rule for the jump menu in the same document.

So, my temporary solution is to add something like this, directly above the feed link relationship:

<link rel="section" title="Jump to entry" href="#content" />

in the header. Seems redundant with the visible 'Skip to main content'. But it works better on text-based browsers.

Satu tanggapan untuk “The First Menu is not Skip to Main Content”

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

Situs ini menggunakan Akismet untuk mengurangi spam. Pelajari bagaimana data komentar Anda diproses.