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

feat: read language from metadata (resolves #129) #216

Merged
merged 6 commits into from
Mar 11, 2020

Conversation

greatislander
Copy link
Collaborator

@greatislander greatislander commented Mar 9, 2020

Description

This PR adds support for resource languages stored in metadata (see platform-coop-toolkit/coop-library-framework#316) and the ability to filter resources by language. It also preserves accordion status on filter application, resolving #129.

Steps to test

  1. Ensure that your library is up to date with feat: store language in metadata coop-library-framework#316 and that language metadata has been converted.
  2. Visit the Resources page.

Expected behavior: Resources in all languages are shown, and they can be filtered by language.

Additional information

Not applicable.

Related issues

@greatislander greatislander self-assigned this Mar 9, 2020
@greatislander greatislander added the enhancement New feature or request label Mar 9, 2020
@greatislander greatislander added this to the 1.0.0-alpha.2 milestone Mar 9, 2020
@greatislander greatislander requested a review from jhung March 9, 2020 17:37
@greatislander greatislander marked this pull request as ready for review March 9, 2020 17:37
@greatislander greatislander changed the title feat: read language from metadata feat: read language from metadata (resolves #129) Mar 10, 2020
Copy link
Contributor

@jhung jhung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue #208 affects the Deselect All label, but does not need to be fixed in this PR.

@endif
@foreach($terms as $term => $name)
<li class="tag">
<button class="button button--tag-button" data-checkbox="{{ $taxonomy }}-{{ $term }}"><span class="screen-reader-text">{{ __('Remove', 'coop-library') }} </span>{!! $name !!}<span class="screen-reader-text"> {{ __('from current filters', 'coop-library') }}</span> @svg('close', 'icon--close', ['focusable' => 'false', 'aria-hidden' => 'true'])</button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue #208 affects this label as well.

NVDA will read the label as "Remove alllanguages" (with the effect of slurring the two words together). Inspecting the accessibility shows that the label is properly structured.

@greatislander greatislander merged commit 45674f2 into dev Mar 11, 2020
@greatislander greatislander deleted the add/language-meta branch March 11, 2020 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When applying filters to resource list, open accordions should remain open upon reload
2 participants