a11y fixes
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
.search__label {
|
.search__label {
|
||||||
left: -10000px;
|
left: -10000px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -10000px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search__input {
|
.search__input {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class Windycoys_Walker_Navigation extends Walker_Nav_Menu {
|
class Windycoys_Walker_Navigation extends Walker_Nav_Menu {
|
||||||
function start_lvl(&$output, $depth = 0, $args = Array()) {
|
function start_lvl(&$output, $depth = 0, $args = Array()) {
|
||||||
$output .= '<ul class="nav__list">';
|
$output .= '<ul class="nav__list" role="menu">';
|
||||||
}
|
}
|
||||||
|
|
||||||
function end_lvl(&$output, $depth = 0, $args = Array()) {
|
function end_lvl(&$output, $depth = 0, $args = Array()) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ $form_settings = array(
|
|||||||
comment_notes_before => '<p class="comment-respond__notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',
|
comment_notes_before => '<p class="comment-respond__notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',
|
||||||
fields => array(
|
fields => array(
|
||||||
author => '<div class="comment-respond__item"><label class="comment-respond__label" for="author">' . __( 'Name', 'domainreference' ) . ( $req ? '<span class="comment-respond__required">*</span>' : '' ) . '</label>' . '<input class="comment-respond__input" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></div>',
|
author => '<div class="comment-respond__item"><label class="comment-respond__label" for="author">' . __( 'Name', 'domainreference' ) . ( $req ? '<span class="comment-respond__required">*</span>' : '' ) . '</label>' . '<input class="comment-respond__input" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></div>',
|
||||||
email => '<div class="comment-respond__item"><label class="comment-respond__label" for="email">' . __( 'Email', 'domainreference' ) . ( $req ? '<span class="comment-respond__required">*</span>' : '' ) . '</label>' . '<input class="comment-respond__input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></div>',
|
email => '<div class="comment-respond__item"><label class="comment-respond__label" for="email">' . __( 'Email', 'domainreference' ) . ( $req ? '<span class="comment-respond__required">*</span>' : '' ) . '</label>' . '<input class="comment-respond__input" id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></div>',
|
||||||
url => '<div class="comment-respond__item"><label class="comment-respond__label" for="url">' . __( 'Website', 'domainreference' ) . '</label>' . '<input class="comment-respond__input" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></div>',
|
url => '<div class="comment-respond__item"><label class="comment-respond__label" for="url">' . __( 'Website', 'domainreference' ) . '</label>' . '<input class="comment-respond__input" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></div>',
|
||||||
cookies => '<div class="comment-respond__item comment-respond__item--large"><input class="comment-respond__checkbox" id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"/><label class="comment-respond__checkbox-label" for="wp-comment-cookies-consent">Save my name, email, and website in this browser for the next time I comment.</label></div>',
|
cookies => '<div class="comment-respond__item comment-respond__item--large"><input class="comment-respond__checkbox" id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"/><label class="comment-respond__checkbox-label" for="wp-comment-cookies-consent">Save my name, email, and website in this browser for the next time I comment.</label></div>',
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<?php get_template_part('partials/logo') ?>
|
<?php get_template_part('partials/logo') ?>
|
||||||
</section>
|
</section>
|
||||||
<section class="page__content page__content--centered-md">
|
<section class="page__content page__content--centered-md">
|
||||||
<h2 class="title">Latest articles</h2>
|
<h1 class="title">Latest articles</h1>
|
||||||
<div class="page__columns">
|
<div class="page__columns">
|
||||||
<?php
|
<?php
|
||||||
$posts = get_posts(array(
|
$posts = get_posts(array(
|
||||||
|
|||||||
@@ -1,4 +1,20 @@
|
|||||||
<?php require get_template_directory() . '/classes/walker.navigation.php' ?>
|
<?php
|
||||||
|
require get_template_directory() . '/classes/walker.navigation.php';
|
||||||
|
|
||||||
|
$menu = wp_nav_menu(array(
|
||||||
|
'echo' => false,
|
||||||
|
'menu' => 'navigation',
|
||||||
|
'container_class' => 'nav__menu',
|
||||||
|
'menu_class' => 'nav__list',
|
||||||
|
'walker' => new Windycoys_Walker_Navigation(),
|
||||||
|
));
|
||||||
|
|
||||||
|
$menu = str_replace(
|
||||||
|
'ul id="menu-navigation" class="nav__list"',
|
||||||
|
'ul id="menu-navigation" class="nav__list" role="menubar"',
|
||||||
|
$menu
|
||||||
|
);
|
||||||
|
?>
|
||||||
<nav class="nav<?php echo is_user_logged_in() ? ' logged-in' : '' ?>" aria-label="Main Navigation">
|
<nav class="nav<?php echo is_user_logged_in() ? ' logged-in' : '' ?>" aria-label="Main Navigation">
|
||||||
<button class="menu">
|
<button class="menu">
|
||||||
<span class="menu__line"></span>
|
<span class="menu__line"></span>
|
||||||
@@ -20,21 +36,16 @@
|
|||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav__body">
|
<div class="nav__body">
|
||||||
<?php wp_nav_menu(array(
|
<?php echo $menu ?>
|
||||||
menu => 'navigation',
|
|
||||||
container_class => 'nav__menu',
|
|
||||||
menu_class => 'nav__list',
|
|
||||||
walker => new Windycoys_Walker_Navigation()
|
|
||||||
)); ?>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="nav__foot">
|
<div class="nav__foot">
|
||||||
<div class="nav__social">
|
<div class="nav__social">
|
||||||
<a class="nav__social-link" href="https://www.facebook.com/WindyCOYS/">
|
<a class="nav__social-link" href="https://www.facebook.com/WindyCOYS/" aria-label="WindyCOYS on Facebook">
|
||||||
<svg class="icon icon--large">
|
<svg class="icon icon--large">
|
||||||
<use xlink:href="#icon-facebook"></use>
|
<use xlink:href="#icon-facebook"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
<a class="nav__social-link" href="https://twitter.com/windycoys/">
|
<a class="nav__social-link" href="https://twitter.com/windycoys/" aria-label="WindyCOYS on Twitter">
|
||||||
<svg class="icon icon--large">
|
<svg class="icon icon--large">
|
||||||
<use xlink:href="#icon-twitter"></use>
|
<use xlink:href="#icon-twitter"></use>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ if (count($links) > 1) :
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<nav class="pagination__content" aria-label="Pagination navigation">
|
<nav class="pagination__content" role="navigation" aria-label="Pagination navigation">
|
||||||
<ul class="pagination__list" role="navigation">
|
<ul class="pagination__list">
|
||||||
<?php foreach($links as $link) { ?>
|
<?php foreach($links as $link) { ?>
|
||||||
<li class="pagination__item">
|
<li class="pagination__item">
|
||||||
<?php echo $key ?>
|
<?php echo $key ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user