function theme_facetapi_accessible_markup in Facet API 7.2
Same name and namespace in other branches
- 6.3 facetapi.theme.inc \theme_facetapi_accessible_markup()
- 7 facetapi.theme.inc \theme_facetapi_accessible_markup()
Returns HTML that adds accessible markup to facet links.
Parameters
$variables: An associative array containing:
- text: The text of the facet link.
- active: Whether the item is active or not.
See also
http://drupal.org/node/1316580
3 theme calls to theme_facetapi_accessible_markup()
- theme_current_search_link_active in contrib/
current_search/ current_search.theme.inc - Returns HTML for a grouped active facet item.
- theme_facetapi_link_active in ./
facetapi.theme.inc - Returns HTML for an active facet item.
- theme_facetapi_link_inactive in ./
facetapi.theme.inc - Returns HTML for an inactive facet item.
File
- ./
facetapi.theme.inc, line 146 - Theme functions for the Facet API module.
Code
function theme_facetapi_accessible_markup($variables) {
$vars = array(
'@text' => $variables['text'],
);
$text = $variables['active'] ? t('Remove @text filter', $vars) : t('Apply @text filter', $vars);
// Add spaces before and after the text, since other content may be displayed
// inline with this and we don't want the words to run together. However, the
// spaces must be inside the <span> so as not to disrupt the layout for
// sighted users.
return '<span class="element-invisible"> ' . $text . ' </span>';
}