Your IP : 216.73.216.1


Current Path : /home/fotouserdopd8j/agenciacrabli.com/wp-contentn/themes/pally/inc/
Upload File :
Current File : /home/fotouserdopd8j/agenciacrabli.com/wp-contentn/themes/pally/inc/template-functions.php

<?php
/**
 * Functions which enhance the theme by hooking into WordPress
 *
 * @package pally
 */

/**
 * Adds custom classes to the array of body classes.
 *
 * @param array $classes Classes for the body element.
 * @return array
 */
function pally_body_classes( $classes ) {
	// Adds a class of hfeed to non-singular pages.
	if ( ! is_singular() ) {
		$classes[] = 'hfeed';
	}

	// Adds a class of no-sidebar when there is no sidebar present.
	if ( ! is_active_sidebar( 'sidebar-1' ) ) {
		$classes[] = 'no-sidebar';
	}

	return $classes;
}
add_filter( 'body_class', 'pally_body_classes' );

/**
 * Add a pingback url auto-discovery header for single posts, pages, or attachments.
 */
function pally_pingback_header() {
	if ( is_singular() && pings_open() ) {
		printf( '<link rel="pingback" href="%s">', esc_url( get_bloginfo( 'pingback_url' ) ) );
	}
}
add_action( 'wp_head', 'pally_pingback_header' );

/**
 * Returns the size for avatars used in the theme.
 */
function pally_get_avatar_size() {
	return 60;
}


/**
 * Function for Extra A11y Page and Content
 */
function pally_admin_page_a11y() {
	?>
	<div class="a11y">

		<h1><?php esc_html_e( 'About the pally theme & more', 'pally' ); ?></h1>


		<h2><?php esc_html_e( 'What is A11y and what is pally?', 'pally' ); ?></h2>

		<h3>A11y = Accessibility</h3>

		<p><?php esc_html_e( 'Accessibility is the practice of making your websites usable by as many people as possible. We traditionally think of this as being about people with disabilities, but the practice of making sites accessible also benefits other groups such as those using mobile devices, or those with slow network connections. [MDN Web Docs]', 'pally' ); ?></p>

		<h2>ally</h2>
		<p><?php esc_html_e( 'The name of this theme is pally, a combination of the words pal and a11y, the short form for accessibility.', 'pally' ); ?></p>
		<p><?php esc_html_e( 'The A11y guidance and success criteria are organized around 4 principles. These principles place emphasis on how people interact with content and must be:', 'pally' ); ?></p>
		<ul>
			<li><?php esc_html_e( 'Perceivable: interacting with the content using the medium that they are familiar with. For example, providing text alternatives for those who are blind.', 'pally' ); ?></li>
			<li><?php esc_html_e( 'Operable: finding and using content is accessible. For example, being able to use a keyboard or a screen reader.', 'pally' ); ?></li>
			<li><?php esc_html_e( 'Understandable: content uses clear language and is understandable. For example, use meaningful labels, explain all abbreviations.', 'pally' ); ?></li>
			<li><?php esc_html_e( 'Robust: content can be interpreted in a range of ways. For example, assistive technologies are able to interpret and parse content.', 'pally' ); ?></li>
	  </ul>

		<br>



		<h3>
			<?php esc_html_e( 'Tips for making your blog more accessible', 'pally' ); ?>
		</h3>

		<h4><?php esc_html_e( 'Here you can learn how to contribute to better accessibility as an editor:', 'pally' );?></h4>


		<p>
		<strong>
		<?php esc_html_e( 'Add alt texts to images', 'pally' ); ?>
		</strong>
		<br>
			<?php esc_html_e( 'Do not describe what is on the image, describe the context or purpose (or in case it is a link, where the link leads to). You can do this in the media library or by selecting the image in the editor.', 'pally' ); ?>
		</p>

		<p>
		<strong>
		<?php esc_html_e( 'Add text alternatives for videos and sound. For video, also add audio description.', 'pally' ); ?>
		</strong>
		</p>

		<p>
		<strong>
		<?php esc_html_e( 'Headings', 'pally' ); ?>
		</strong>
		<br>
			<?php esc_html_e( 'When adding headings, do not skip heading levels. H1 should be followed by H2 and so on.', 'pally' ); ?>
		</p>

		<p>
		<strong>
		<?php esc_html_e( 'Text', 'pally' ); ?>
		</strong>
		<br>
		<?php esc_html_e( 'Keep your text simple and easy to read. Paragraphs with more than four lines are more difficult to read. Use lists and spacing in your content. Do not center texts.', 'pally' ); ?>
		</p>

		<p>
		<strong>
		<?php esc_html_e( 'Links', 'pally' ); ?>
		</strong>
		<br>
		<?php esc_html_e( 'Regarding link destinations, rule of thumb is: Always tell a visitor what to expect when selecting a link. Links should not open in a new window. Let the user decide to open a new window or not.', 'pally' ); ?>
		<br>
		<?php esc_html_e( 'Good link texts: a link text should describe the resource that it links to, even when the text is read out of context. The user must know what to expect. A link text should be descriptive and meaningful. Do not use more or click here.', 'pally' ); ?>
		</p>

		<p>
		<strong>
		<?php esc_html_e( 'Colors', 'pally' ); ?>
		</strong>
		<br>
		<?php esc_html_e( 'Be aware of color contrasts: WCAG 2.0 level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. WCAG 2.1 requires a contrast ratio of at least 3:1 for graphics and user interface components (such as form input borders). WCAG Level AAA requires a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text.', 'pally' ); ?>
		<br>
		<?php esc_html_e( 'Large text is defined as 14 point (typically 18.66px) and bold or larger, or 18 point (typically 24px) or larger.', 'pally' ); ?>
		<br><br>
		<?php esc_html_e( 'A good tool to check contrasts is', 'pally' ); ?> <a href="https://webaim.org/resources/contrastchecker/">Contrast-Checker</a>.

		<?php esc_html_e( 'Alternatively, install plugin WP Accessibility and find a contrast checker in the settings. Installing this plugin is recommended.', 'pally' ); ?><br>
		<a href="https://de.wordpress.org/plugins/wp-accessibility/">Plugin WP Accessibility</a>
		</p>
		<br>

		<h3>
			<?php esc_html_e( 'Testing for A11y', 'pally' ); ?>
		</h3>
		<p><?php esc_html_e( 'It is important to constantly test for A11y when you build a website. There are many good tools out there, here are some examples of free ones:', 'pally' ); ?></p>
		<ul>
			<li><a href="https://chrome.google.com/webstore/detail/siteimprove-accessibility/djcglbmbegflehmbfleechkjhmedcopn">Siteimprove Plugin for Chrome</a></li>
			<li><a href="https://wave.webaim.org/">WAVE</a></li>
			<li><a href="https://www.deque.com/axe/">AXE (Deque)</a></li>
			<li><a href="https://developers.google.com/web/tools/lighthouse">Lighthouse in Chrome DevTools</a></li>
			<li><a href="https://www.w3.org/WAI/ER/tools/">W3C Web Accessibility Evaluation Tools List</a></li>

		</ul>

		<br>


		<h3>
			<?php esc_html_e( 'Sources and Info about A11y', 'pally' ); ?>
		</h3>
		<ul>
			<li><a href="https://make.wordpress.org/accessibility/">Make WordPress: Accessibility</a></li>
			<li><a href="https://make.wordpress.org/themes/handbook/review/accessibility/">WordPress Theme Accessibility Guidelines</a></li>
			<li><a href="http://make.wordpress.org/support/user-manual/web-publishing/accessibility/">WordPress User Manual: Accessibility</a></li>
			<li><a href="https://www.linkedin.com/learning/wordpress-accessibility-2">WordPress Accessibility at LinkedIn Learning</a></li>
		</ul>

		<br>

		<h3>
			<?php esc_html_e( 'Need help?', 'pally' ); ?>
		</h3>
		<p>	<?php esc_html_e( 'Here we have put together some help to for installing and setting up the pally theme:', 'pally' ); ?><br>
		<a href="themes.php?page=pally_theme"><?php esc_html_e( 'pally Setup Help', 'pally' ); ?></a></p>



</div>
	<?php
}