-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/11606 pni category nav not accessible and invalid (#11869)
* Refactor dropwdown link for accessibility * Minor improvement tweaks * Lint * fix linting error --------- Co-authored-by: Ben Morse <[email protected]> Co-authored-by: Mavis Ou <[email protected]>
- Loading branch information
1 parent
f0e666a
commit a1e19da
Showing
2 changed files
with
147 additions
and
85 deletions.
There are no files selected for viewing
73 changes: 27 additions & 46 deletions
73
network-api/networkapi/templates/fragments/buyersguide/category_dropdown.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,32 @@ | ||
{% load static wagtailcore_tags localization bg_nav_tags wagtailimages_tags i18n %} | ||
|
||
<button | ||
class=" | ||
pni-category-dropdown | ||
tw-hidden | ||
tw-bg-transparent | ||
tw-items-center | ||
tw-relative | ||
tw-pr-10 | ||
tw-py-4 | ||
tw-mr-auto | ||
tw-font-sans | ||
tw-font-bold | ||
tw-text-sm | ||
tw-group | ||
hover:tw-text-black | ||
tw-text-gray-40 | ||
" | ||
> | ||
<span>{% trans "More Categories" %}</span> | ||
<svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg" class="tw-ml-4 tw-origin-center tw-stroke-gray-40 group-hover:tw-stroke-black"> | ||
<title>{% trans "Open category drop down" %}</title> | ||
<path d="M1 1L5.02504 5.02504L9.05007 1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
</svg> | ||
<ul id="pni-category-dropdown-select" class="tw-hidden tw-list-none tw-absolute tw-right-0 tw-p-0 tw-top-0 tw-z-50 tw-border-gray-20 tw-border tw-pb-4 tw-bg-white"> | ||
<li class=" | ||
tw-bg-white | ||
tw-w-full | ||
tw-mr-0 | ||
tw-font-sans | ||
tw-font-bold | ||
tw-no-underline | ||
tw-px-8 | ||
tw-py-4 | ||
tw-mb-0 | ||
tw-text-black | ||
tw-flex | ||
tw-items-center | ||
tw-justify-end | ||
tw-text-sm | ||
"> | ||
<div class="pni-category-dropdown tw-hidden tw-relative"> | ||
<button | ||
class=" | ||
pni-category-dropdown-button | ||
tw-bg-transparent | ||
tw-relative | ||
tw-pr-10 | ||
tw-py-4 | ||
tw-mr-auto | ||
tw-font-sans | ||
tw-font-bold | ||
tw-text-sm | ||
tw-group | ||
hover:tw-text-black | ||
tw-text-gray-40 | ||
" | ||
aria-controls="pni-category-dropdown-select" | ||
aria-expanded="false" | ||
aria-label="{% trans "More Categories" %}" | ||
> | ||
<span aria-hidden="true" class="tw-inline-flex tw-items-center"> | ||
<span>{% trans "More Categories" %}</span> | ||
<svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg" class="tw-ml-4 tw-origin-center tw-stroke-black tw-rotate-180"> | ||
<title>{% trans "Close category drop down" %}</title> | ||
<svg width="11" height="7" viewBox="0 0 11 7" fill="none" xmlns="http://www.w3.org/2000/svg" class="tw-ml-4 tw-origin-center tw-stroke-gray-40 group-hover:tw-stroke-black"> | ||
<path d="M1 1L5.02504 5.02504L9.05007 1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
</svg> | ||
</li> | ||
</ul> | ||
</span> | ||
</button> | ||
<ul id="pni-category-dropdown-select" class="tw-hidden tw-list-none tw-absolute tw-top-full tw-w-auto tw-right-0 tw-p-0 tw-z-50 tw-border-gray-20 tw-border tw-pb-4 tw-bg-white"> | ||
|
||
</button> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters