Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility audit and update #61

Open
mestradanu opened this issue Apr 9, 2020 · 3 comments
Open

Accessibility audit and update #61

mestradanu opened this issue Apr 9, 2020 · 3 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@mestradanu
Copy link
Contributor

I did a deep dive recently into the theme that refactored a lot of markup and therefore the theme could use with an accessibility audit and markup changes where needed.

Please branch off develop and tag this issue when doing a PR.

Will include this with the next release that will include #60 so that we can integrate it into the NCU project.

@mestradanu mestradanu added the help wanted Extra attention is needed label Apr 9, 2020
@cmaustnu
Copy link
Contributor

@mestradanu, I think we should update the current Widgets template part to use article instead of div for accessibility reasons, however if we do this, we'll also need to add an aria-label, which currently could only be generic per column.

If we update the "Content Columns" meta fields from the current WYSIWYG that contains both the h2 and the ul, and add a new field for the h2, we could use that as the aria-label to be more specific to the actual content of the article.

Lemme know your thoughts.

@mestradanu
Copy link
Contributor Author

My follow up to our offline chat as well:
What if we add a description field to the columns along the lines of If using an initial heading, use an H2 tag and add ID attribute "Content area #{column number}.?

The current PR #66 adds a check for the content to to determine the counter to determine the aria label but the key option in the foreach loop could be utilized and instead of $counter a flag to note whether the page content exists as boolean $content_flag.

if ( $columns ) {
if ( empty( get_the_content() ) ) {
$counter = 1;
} else {
$counter = 2;
}
foreach ( $columns as $column ) {
?>
<article class="widget col-12 col-sm-6 col-lg-4 mb-5" aria-label="Content area #<?php echo esc_attr( $counter ); ?>">
<?php echo wp_kses_post( $column ); ?>
</article>
<?php
$counter++;
};
}

@cmaustnu
Copy link
Contributor

@mestradanu made updates on PR #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants