justintadlock / breadcrumb-trail

Official home of the Breadcrumb Trail plugin for WordPress.
GNU General Public License v2.0
136 stars 61 forks source link

Aria landmark roles #6

Closed justintadlock closed 9 years ago

justintadlock commented 10 years ago

Need something like this added to the container:

role="navigation" aria-label="<?php esc_attr_e( 'Breadcrumbs', 'breadcrumb-trail' ); ?>"

Reference: https://github.com/justintadlock/hybrid-core/issues/80

samikeijonen commented 10 years ago

Nice! We're getting better at accessibility.

samikeijonen commented 10 years ago

I tested this kind of code and seems to do the trick.

/* Open the breadcrumb trail containers. */
$breadcrumb = "\n\t\t" . '<' . tag_escape( $this->args['container'] ) . ' role="navigation" aria-label="' . esc_attr_x( 'Breadcrumbs', 'Breadcrumbs aria label', 'breadcrumb-trail' ) . '" class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb">';
justintadlock commented 9 years ago

Fixed: https://github.com/justintadlock/breadcrumb-trail/commit/1ec208c5530755a09c46046ea862165389aeab0b