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

Dm 5109 additional search filters accessibility #996

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

PhilipDeFraties
Copy link
Collaborator

@PhilipDeFraties PhilipDeFraties commented Aug 22, 2024

JIRA issue link

https://agile6.atlassian.net/browse/DM-5109

Description - what does this code do?

Adds an empty div to above search filters header that, when activated via space or enter key, skips to the first search result on the page

Testing done - how did you test it/steps on how can another person can test it

  1. Locally on the search page, use the tab key to navigate to the empty div above the filters header
  2. Verify that upon activating with the enter or space key the focus shifts to the link of the first result on the page

Screenshots, Gifs, Videos from application (if applicable)

Link to mock-ups/mock ups (image file if you have it) (if applicable)

Acceptance criteria

  • [ ]

Definition of done

  • Unit tests written (if applicable)
  • e2e/accessibility tests written (if applicable)
  • Events are logged appropriately
  • Documentation has been updated, if applicable
  • A link has been provided to the originating JIRA issue
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs

camillevilla and others added 15 commits August 20, 2024 14:06
* Add some placeholder text and responsive behavior for new search header

* Add a default style for applied filters

* Move results count to new header

* Set up placeholder content for Filters panel and Innovation results with links to relevant tickets

* working commit

* update search page partial

edits new search page header, adds margin styling, updates header copy

* update js search logic

adds to search logic functionality to dynamically update search page header

* add feature specs for search page header

---------

Co-authored-by: Camille Villa <[email protected]>
* Comment out new layout HTML to get most tests passing

* Fix test to reflect 'Result' behavior change

* Remove 'Reset filters' button and update specs to fix a11y tests

* update search sort partial

renames id for span

* update feature specs referrencing search header

updates expected header copy

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: PhilipDeFraties <[email protected]>
* Create a feature branch for search results refresh

* Dm 4910 update search page headers (#934)

* Add some placeholder text and responsive behavior for new search header

* Add a default style for applied filters

* Move results count to new header

* Set up placeholder content for Filters panel and Innovation results with links to relevant tickets

* working commit

* update search page partial

edits new search page header, adds margin styling, updates header copy

* update js search logic

adds to search logic functionality to dynamically update search page header

* add feature specs for search page header

---------

Co-authored-by: Camille Villa <[email protected]>

* Get test suite working for feature branch (#954)

* Comment out new layout HTML to get most tests passing

* Fix test to reflect 'Result' behavior change

* Remove 'Reset filters' button and update specs to fix a11y tests

* update search sort partial

renames id for span

* update feature specs referrencing search header

updates expected header copy

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: PhilipDeFraties <[email protected]>

* update search view

removes placeholder spans for applied filters

adds display-none to "Clear filters" button

* update search js

adds functions addAppliedFilter and uncheckFilter scoped within search function that dynamically add spans for applied filters within search header with eventListener to remove the span when clicked

* update search js

updates addAppliedFilter function so that a remove button is added that controls clearing of the filter

* add feature spec for dynamic filters on search page

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: Camille Villa <[email protected]>
* Create a feature branch for search results refresh

* Dm 4910 update search page headers (#934)

* Add some placeholder text and responsive behavior for new search header

* Add a default style for applied filters

* Move results count to new header

* Set up placeholder content for Filters panel and Innovation results with links to relevant tickets

* working commit

* update search page partial

edits new search page header, adds margin styling, updates header copy

* update js search logic

adds to search logic functionality to dynamically update search page header

* add feature specs for search page header

---------

Co-authored-by: Camille Villa <[email protected]>

* Get test suite working for feature branch (#954)

* Comment out new layout HTML to get most tests passing

* Fix test to reflect 'Result' behavior change

* Remove 'Reset filters' button and update specs to fix a11y tests

* update search sort partial

renames id for span

* update feature specs referrencing search header

updates expected header copy

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: PhilipDeFraties <[email protected]>

* DM-4911:  Display applied filters as USWDS Tags (#953)

* Create a feature branch for search results refresh

* Dm 4910 update search page headers (#934)

* Add some placeholder text and responsive behavior for new search header

* Add a default style for applied filters

* Move results count to new header

* Set up placeholder content for Filters panel and Innovation results with links to relevant tickets

* working commit

* update search page partial

edits new search page header, adds margin styling, updates header copy

* update js search logic

adds to search logic functionality to dynamically update search page header

* add feature specs for search page header

---------

Co-authored-by: Camille Villa <[email protected]>

* Get test suite working for feature branch (#954)

* Comment out new layout HTML to get most tests passing

* Fix test to reflect 'Result' behavior change

* Remove 'Reset filters' button and update specs to fix a11y tests

* update search sort partial

renames id for span

* update feature specs referrencing search header

updates expected header copy

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: PhilipDeFraties <[email protected]>

* update search view

removes placeholder spans for applied filters

adds display-none to "Clear filters" button

* update search js

adds functions addAppliedFilter and uncheckFilter scoped within search function that dynamically add spans for applied filters within search header with eventListener to remove the span when clicked

* update search js

updates addAppliedFilter function so that a remove button is added that controls clearing of the filter

* add feature spec for dynamic filters on search page

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: Camille Villa <[email protected]>

* update search page css

adds 4 new css classes for applied-filter s that contain custom colors

* udpate search page js

adds logic to addAppliedFilter so that styling is applied to the filters cyclicly through the 4 available css classes

* update search page css

adds styling to applied-filter class

* update search page js concerning applied filter tags

updates addAppliedFilter function's arg name, updates css applied to span created for filter tag

* update search page js function addAppliedFilter

changes applied filter element to be button in order to be keyboard interractive, adds aria copy for button interaction explanation

* update search page js function addAppliedFilter

adds id to created element, re-orders logic to be more readable

* update search feature spec

updates as per changes to search page js

* update visn show js

changes query selector to find results element based on updated id

* update category_checkbox partial

adds data value for parent category to checkbox element being created

* updates seach page js

edits Category logic so that parent categories are taken into consideration when applying css class to applied filter elements

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: Camille Villa <[email protected]>
* update search html and js

moves form to be within the searchResultsContainer

adds dynamicFilters section that contains the filters. The filtersContainer contents is injected into either the desktop or mobile sections depending on screen size via new js function moveFilters

* update search_filters html

edits in order to display the filters as per new design with categories nested under their respective "All" checkbox and all within a scrollable, height-restricted section

removes originating and adopting combobox accordions

updates css to add filters-scrollbar classes

removes old css class usa-checkbox__label:before

* remove old partial for category checkboxes

* update visn_facility_combo_box

removes margin classes from parent div

* update search_filters html

adds data-parent-category value to sub category checkbox elements

* edit search_filters html

moves "Tags" header, adds "Filters" header

* update "Browse All Tags" link in homepage search dropdown

removes "filters=open" param from href

updates feature spec relating to link

* update search page js

updates updateResults function, adds default bool argument to allow for skipping check of facilities comboboxes

simplifies logic to use updateResults function to perform search when url includes query or category

comments out logic surrounding updating filter dropdown text tracking filter count

* update search page js

refactors part of search function, simplifies logic surrounding applying selected filter tags

* update search html

removes unnecessary element id

* update search_filters html

fixes interpolated values for checkboxes by adding quotes

add parent divs with unique ids for facility comboboxes

* update search page js

removes old logic surrounding filter count tracking and auto-opening and closing removed accordions

* update search page html

updates ids of filter container elements

* remove logic concerning old mobile filters accordion from search page js

* add smooth scroll-behavios to search filters scrollbar

* remove old search filter container css classes

* update search filters classnames

* spacing

* udpate search filters headers to legends

* update search filters accordion copy

* add padding to category-filters fieldset

* update expected text in about_spec

* remove click of old accordion button from admin_categories_spec

* update search js

adds optional param skipSearchTracking to searchPracticesPage function in order to skip tracking category selection when category selected from hompage search dropdown or when an applied filter is removed

updates improveResultScoreBasedOnAmountOfCategoryMatches function to utilize the categories as they are sent as param rather than utilize accumulator that has since been removed

* update homepage search specs

* update search page js

refactors updateResults method, splits into helper methods for readability

fixes logic that determines if category usage should be tracked

* update search_filters partial

edits value for category checkbox label classname

* update search feature specs

updates to no longer expect filters accordion button

* update search page js

moves results section to be within same grid-row as filters

* spacing

* update search page html to remove sort container from results section

* update search_filters partial html to include sort container

* update fieldset classes in search_filters partial

* update search page js to utilize new buildSearchPagePracticeCard function to create search result elements

* update search_filters html to move sort box to top of filters section

* udpate styling of filters section in search_filters html

* update search page html, removes old property values for search-results element

* update search_filters html

moves sort section to top of fieldsets, changes to radio buttons element

* update search js relating to sort element

changes to expect radio buttons, removes functionality related to hiding the sort element when results are empty

* update search_filters html to change sort section from fieldset to normal div

the sort section is not part of the form that is contained within

* update search_filters html

removes uneccessary css classes

adds aria labels to container and options

* update search page js function buildSearchPagePracticeCard

updates name to buildSearchResult

renames scoped variables to avoid confusion with old function this replicates

updates html styling to utilize uswds utilities

* udpate practice_card_utilities js

adds replaceSearchPageImagePlaceholders function to replicate replaceImagePlaceholders but with updated search page html expected

need to keep old function because it is used elsewhere on the site where search functionality exists

* update search_result css

updates classname for image container div

removes unecessary class

* update search js

updates buildSearchPagePracticeCard function, changes name and scoped var names, updates classnames and structure of produced html

updates getSelectedCategories function to check filtersContainer for selected filter data

* update search partial

moves form to be localized around the search field grid-row only

* update search_filters partial

adds form value to submit button

* update search css

moves hr tag definition from within dm-search-practices class to be within the search-page id so that the styling will be consistent for all hr tags on the page

* update search html

updates id name of filters container element

* update search js

adjusts css classes within search results elements

doubles startNum and afterNum to account for extra hr elements within results in order to continue to paginate by 12 results at a time

updates expected classname for filters container element

* update search filters partial

updates classnames of hr tags

* update search-result-img-container css class

adds img tag styling

* update search-result-img-container css class

updates background-color to theme-color-base-lightest

* update search js

refactors logic responsible for building search results and fetching images to build each one only once and store in an accumulator to be reused rather than rebuilding results every time the search changes

* update search feature specs

* update search page js function buildSearchResult

removes unnecessary div id

* update search spec to use js driver for cache tests

* update breadcrumbs spec

removed aria-hidden-true from search result links

* add preventFocusShift to search js

function prevents window focus shift when clicking filter checkboxes

* update id of search filters div

* update ids of search filter container divs

* remove comments

* remove reference to old filter clear button from search js

* update pagination of search results to add line separators above instead of below

shortens pagination count so bottom result shows no separator line

* remove example markup from search partial

* update search image js to remove alt attr for images added dynamically

* remove aria labels from search sort options

* remove unnecessary accumulator from search js function searchPracticesPage

* update search page js to utilize global var for search results element

* add border-top to dm-search-result css class

* remove hr tag insert from search results generated by buildSearchResults function

* update search_filters html to use bottom-border classes rather than hr tags

* update padding for wrapper div returned by buildSearchResult
* Fix result width for tablet

* Consolidate .dm-search-result styles

* Apply border to all search results

* Move images to their own row on mobile

* Remove unused SCSS

* Consolidate h3 styles

* Consolidate styles for description and originating facility

---------

Co-authored-by: Camille Villa <[email protected]>
* add search results header and decrease search area margin

* update search filters header to display only for desktop

* update desktop search filters container div padding

* update search filters heading styling

* remove unnecessary wrapper div around search results header
* add position-relative to search page filter checkboxes

* remove now-unecessary search page function preventFocusShift

fixed by adding position-relative to filter checkboxes

* add keyboard accessibility tests to search spec
Co-authored-by: Camille Villa <[email protected]>
* Create a feature branch for search results refresh

* Dm 4910 update search page headers (#934)

* Add some placeholder text and responsive behavior for new search header

* Add a default style for applied filters

* Move results count to new header

* Set up placeholder content for Filters panel and Innovation results with links to relevant tickets

* working commit

* update search page partial

edits new search page header, adds margin styling, updates header copy

* update js search logic

adds to search logic functionality to dynamically update search page header

* add feature specs for search page header

---------

Co-authored-by: Camille Villa <[email protected]>

* Get test suite working for feature branch (#954)

* Comment out new layout HTML to get most tests passing

* Fix test to reflect 'Result' behavior change

* Remove 'Reset filters' button and update specs to fix a11y tests

* update search sort partial

renames id for span

* update feature specs referrencing search header

updates expected header copy

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: PhilipDeFraties <[email protected]>

* DM-4911:  Display applied filters as USWDS Tags (#953)

* Create a feature branch for search results refresh

* Dm 4910 update search page headers (#934)

* Add some placeholder text and responsive behavior for new search header

* Add a default style for applied filters

* Move results count to new header

* Set up placeholder content for Filters panel and Innovation results with links to relevant tickets

* working commit

* update search page partial

edits new search page header, adds margin styling, updates header copy

* update js search logic

adds to search logic functionality to dynamically update search page header

* add feature specs for search page header

---------

Co-authored-by: Camille Villa <[email protected]>

* Get test suite working for feature branch (#954)

* Comment out new layout HTML to get most tests passing

* Fix test to reflect 'Result' behavior change

* Remove 'Reset filters' button and update specs to fix a11y tests

* update search sort partial

renames id for span

* update feature specs referrencing search header

updates expected header copy

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: PhilipDeFraties <[email protected]>

* update search view

removes placeholder spans for applied filters

adds display-none to "Clear filters" button

* update search js

adds functions addAppliedFilter and uncheckFilter scoped within search function that dynamically add spans for applied filters within search header with eventListener to remove the span when clicked

* update search js

updates addAppliedFilter function so that a remove button is added that controls clearing of the filter

* add feature spec for dynamic filters on search page

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: Camille Villa <[email protected]>

* dm-4996 search refresh style applied filters (#955)

* Create a feature branch for search results refresh

* Dm 4910 update search page headers (#934)

* Add some placeholder text and responsive behavior for new search header

* Add a default style for applied filters

* Move results count to new header

* Set up placeholder content for Filters panel and Innovation results with links to relevant tickets

* working commit

* update search page partial

edits new search page header, adds margin styling, updates header copy

* update js search logic

adds to search logic functionality to dynamically update search page header

* add feature specs for search page header

---------

Co-authored-by: Camille Villa <[email protected]>

* Get test suite working for feature branch (#954)

* Comment out new layout HTML to get most tests passing

* Fix test to reflect 'Result' behavior change

* Remove 'Reset filters' button and update specs to fix a11y tests

* update search sort partial

renames id for span

* update feature specs referrencing search header

updates expected header copy

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: PhilipDeFraties <[email protected]>

* DM-4911:  Display applied filters as USWDS Tags (#953)

* Create a feature branch for search results refresh

* Dm 4910 update search page headers (#934)

* Add some placeholder text and responsive behavior for new search header

* Add a default style for applied filters

* Move results count to new header

* Set up placeholder content for Filters panel and Innovation results with links to relevant tickets

* working commit

* update search page partial

edits new search page header, adds margin styling, updates header copy

* update js search logic

adds to search logic functionality to dynamically update search page header

* add feature specs for search page header

---------

Co-authored-by: Camille Villa <[email protected]>

* Get test suite working for feature branch (#954)

* Comment out new layout HTML to get most tests passing

* Fix test to reflect 'Result' behavior change

* Remove 'Reset filters' button and update specs to fix a11y tests

* update search sort partial

renames id for span

* update feature specs referrencing search header

updates expected header copy

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: PhilipDeFraties <[email protected]>

* update search view

removes placeholder spans for applied filters

adds display-none to "Clear filters" button

* update search js

adds functions addAppliedFilter and uncheckFilter scoped within search function that dynamically add spans for applied filters within search header with eventListener to remove the span when clicked

* update search js

updates addAppliedFilter function so that a remove button is added that controls clearing of the filter

* add feature spec for dynamic filters on search page

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: Camille Villa <[email protected]>

* update search page css

adds 4 new css classes for applied-filter s that contain custom colors

* udpate search page js

adds logic to addAppliedFilter so that styling is applied to the filters cyclicly through the 4 available css classes

* update search page css

adds styling to applied-filter class

* update search page js concerning applied filter tags

updates addAppliedFilter function's arg name, updates css applied to span created for filter tag

* update search page js function addAppliedFilter

changes applied filter element to be button in order to be keyboard interractive, adds aria copy for button interaction explanation

* update search page js function addAppliedFilter

adds id to created element, re-orders logic to be more readable

* update search feature spec

updates as per changes to search page js

* update visn show js

changes query selector to find results element based on updated id

* update category_checkbox partial

adds data value for parent category to checkbox element being created

* updates seach page js

edits Category logic so that parent categories are taken into consideration when applying css class to applied filter elements

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: Camille Villa <[email protected]>

* Dm 4913 new search results (#972)

* update search html and js

moves form to be within the searchResultsContainer

adds dynamicFilters section that contains the filters. The filtersContainer contents is injected into either the desktop or mobile sections depending on screen size via new js function moveFilters

* update search_filters html

edits in order to display the filters as per new design with categories nested under their respective "All" checkbox and all within a scrollable, height-restricted section

removes originating and adopting combobox accordions

updates css to add filters-scrollbar classes

removes old css class usa-checkbox__label:before

* remove old partial for category checkboxes

* update visn_facility_combo_box

removes margin classes from parent div

* update search_filters html

adds data-parent-category value to sub category checkbox elements

* edit search_filters html

moves "Tags" header, adds "Filters" header

* update "Browse All Tags" link in homepage search dropdown

removes "filters=open" param from href

updates feature spec relating to link

* update search page js

updates updateResults function, adds default bool argument to allow for skipping check of facilities comboboxes

simplifies logic to use updateResults function to perform search when url includes query or category

comments out logic surrounding updating filter dropdown text tracking filter count

* update search page js

refactors part of search function, simplifies logic surrounding applying selected filter tags

* update search html

removes unnecessary element id

* update search_filters html

fixes interpolated values for checkboxes by adding quotes

add parent divs with unique ids for facility comboboxes

* update search page js

removes old logic surrounding filter count tracking and auto-opening and closing removed accordions

* update search page html

updates ids of filter container elements

* remove logic concerning old mobile filters accordion from search page js

* add smooth scroll-behavios to search filters scrollbar

* remove old search filter container css classes

* update search filters classnames

* spacing

* udpate search filters headers to legends

* update search filters accordion copy

* add padding to category-filters fieldset

* update expected text in about_spec

* remove click of old accordion button from admin_categories_spec

* update search js

adds optional param skipSearchTracking to searchPracticesPage function in order to skip tracking category selection when category selected from hompage search dropdown or when an applied filter is removed

updates improveResultScoreBasedOnAmountOfCategoryMatches function to utilize the categories as they are sent as param rather than utilize accumulator that has since been removed

* update homepage search specs

* update search page js

refactors updateResults method, splits into helper methods for readability

fixes logic that determines if category usage should be tracked

* update search_filters partial

edits value for category checkbox label classname

* update search feature specs

updates to no longer expect filters accordion button

* update search page js

moves results section to be within same grid-row as filters

* spacing

* update search page html to remove sort container from results section

* update search_filters partial html to include sort container

* update fieldset classes in search_filters partial

* update search page js to utilize new buildSearchPagePracticeCard function to create search result elements

* update search_filters html to move sort box to top of filters section

* udpate styling of filters section in search_filters html

* update search page html, removes old property values for search-results element

* update search_filters html

moves sort section to top of fieldsets, changes to radio buttons element

* update search js relating to sort element

changes to expect radio buttons, removes functionality related to hiding the sort element when results are empty

* update search_filters html to change sort section from fieldset to normal div

the sort section is not part of the form that is contained within

* update search_filters html

removes uneccessary css classes

adds aria labels to container and options

* update search page js function buildSearchPagePracticeCard

updates name to buildSearchResult

renames scoped variables to avoid confusion with old function this replicates

updates html styling to utilize uswds utilities

* udpate practice_card_utilities js

adds replaceSearchPageImagePlaceholders function to replicate replaceImagePlaceholders but with updated search page html expected

need to keep old function because it is used elsewhere on the site where search functionality exists

* update search_result css

updates classname for image container div

removes unecessary class

* update search js

updates buildSearchPagePracticeCard function, changes name and scoped var names, updates classnames and structure of produced html

updates getSelectedCategories function to check filtersContainer for selected filter data

* update search partial

moves form to be localized around the search field grid-row only

* update search_filters partial

adds form value to submit button

* update search css

moves hr tag definition from within dm-search-practices class to be within the search-page id so that the styling will be consistent for all hr tags on the page

* update search html

updates id name of filters container element

* update search js

adjusts css classes within search results elements

doubles startNum and afterNum to account for extra hr elements within results in order to continue to paginate by 12 results at a time

updates expected classname for filters container element

* update search filters partial

updates classnames of hr tags

* update search-result-img-container css class

adds img tag styling

* update search-result-img-container css class

updates background-color to theme-color-base-lightest

* update search js

refactors logic responsible for building search results and fetching images to build each one only once and store in an accumulator to be reused rather than rebuilding results every time the search changes

* update search feature specs

* update search page js function buildSearchResult

removes unnecessary div id

* update search spec to use js driver for cache tests

* update breadcrumbs spec

removed aria-hidden-true from search result links

* add preventFocusShift to search js

function prevents window focus shift when clicking filter checkboxes

* update id of search filters div

* update ids of search filter container divs

* remove comments

* remove reference to old filter clear button from search js

* update pagination of search results to add line separators above instead of below

shortens pagination count so bottom result shows no separator line

* remove example markup from search partial

* update search image js to remove alt attr for images added dynamically

* remove aria labels from search sort options

* remove unnecessary accumulator from search js function searchPracticesPage

* update search page js to utilize global var for search results element

* add border-top to dm-search-result css class

* remove hr tag insert from search results generated by buildSearchResults function

* update search_filters html to use bottom-border classes rather than hr tags

* update padding for wrapper div returned by buildSearchResult

* DM-5095: Responsive behavior tweaks (#975)

* Fix result width for tablet

* Consolidate .dm-search-result styles

* Apply border to all search results

* Move images to their own row on mobile

* Remove unused SCSS

* Consolidate h3 styles

* Consolidate styles for description and originating facility

---------

Co-authored-by: Camille Villa <[email protected]>

* Dm 5099 add search results list header (#976)

* add search results header and decrease search area margin

* update search filters header to display only for desktop

* update desktop search filters container div padding

* update search filters heading styling

* remove unnecessary wrapper div around search results header

* update innovation show page category link param name

* Update spec

* update search page js function updateResults to clear url window conditionally on presence of query

* update homepage spec to expect updated url for dropdown category link click

---------

Co-authored-by: Camille Villa <[email protected]>
Co-authored-by: Camille Villa <[email protected]>
* Dm 4913 new search results (#972)

* update search html and js

moves form to be within the searchResultsContainer

adds dynamicFilters section that contains the filters. The filtersContainer contents is injected into either the desktop or mobile sections depending on screen size via new js function moveFilters

* update search_filters html

edits in order to display the filters as per new design with categories nested under their respective "All" checkbox and all within a scrollable, height-restricted section

removes originating and adopting combobox accordions

updates css to add filters-scrollbar classes

removes old css class usa-checkbox__label:before

* remove old partial for category checkboxes

* update visn_facility_combo_box

removes margin classes from parent div

* update search_filters html

adds data-parent-category value to sub category checkbox elements

* edit search_filters html

moves "Tags" header, adds "Filters" header

* update "Browse All Tags" link in homepage search dropdown

removes "filters=open" param from href

updates feature spec relating to link

* update search page js

updates updateResults function, adds default bool argument to allow for skipping check of facilities comboboxes

simplifies logic to use updateResults function to perform search when url includes query or category

comments out logic surrounding updating filter dropdown text tracking filter count

* update search page js

refactors part of search function, simplifies logic surrounding applying selected filter tags

* update search html

removes unnecessary element id

* update search_filters html

fixes interpolated values for checkboxes by adding quotes

add parent divs with unique ids for facility comboboxes

* update search page js

removes old logic surrounding filter count tracking and auto-opening and closing removed accordions

* update search page html

updates ids of filter container elements

* remove logic concerning old mobile filters accordion from search page js

* add smooth scroll-behavios to search filters scrollbar

* remove old search filter container css classes

* update search filters classnames

* spacing

* udpate search filters headers to legends

* update search filters accordion copy

* add padding to category-filters fieldset

* update expected text in about_spec

* remove click of old accordion button from admin_categories_spec

* update search js

adds optional param skipSearchTracking to searchPracticesPage function in order to skip tracking category selection when category selected from hompage search dropdown or when an applied filter is removed

updates improveResultScoreBasedOnAmountOfCategoryMatches function to utilize the categories as they are sent as param rather than utilize accumulator that has since been removed

* update homepage search specs

* update search page js

refactors updateResults method, splits into helper methods for readability

fixes logic that determines if category usage should be tracked

* update search_filters partial

edits value for category checkbox label classname

* update search feature specs

updates to no longer expect filters accordion button

* update search page js

moves results section to be within same grid-row as filters

* spacing

* update search page html to remove sort container from results section

* update search_filters partial html to include sort container

* update fieldset classes in search_filters partial

* update search page js to utilize new buildSearchPagePracticeCard function to create search result elements

* update search_filters html to move sort box to top of filters section

* udpate styling of filters section in search_filters html

* update search page html, removes old property values for search-results element

* update search_filters html

moves sort section to top of fieldsets, changes to radio buttons element

* update search js relating to sort element

changes to expect radio buttons, removes functionality related to hiding the sort element when results are empty

* update search_filters html to change sort section from fieldset to normal div

the sort section is not part of the form that is contained within

* update search_filters html

removes uneccessary css classes

adds aria labels to container and options

* update search page js function buildSearchPagePracticeCard

updates name to buildSearchResult

renames scoped variables to avoid confusion with old function this replicates

updates html styling to utilize uswds utilities

* udpate practice_card_utilities js

adds replaceSearchPageImagePlaceholders function to replicate replaceImagePlaceholders but with updated search page html expected

need to keep old function because it is used elsewhere on the site where search functionality exists

* update search_result css

updates classname for image container div

removes unecessary class

* update search js

updates buildSearchPagePracticeCard function, changes name and scoped var names, updates classnames and structure of produced html

updates getSelectedCategories function to check filtersContainer for selected filter data

* update search partial

moves form to be localized around the search field grid-row only

* update search_filters partial

adds form value to submit button

* update search css

moves hr tag definition from within dm-search-practices class to be within the search-page id so that the styling will be consistent for all hr tags on the page

* update search html

updates id name of filters container element

* update search js

adjusts css classes within search results elements

doubles startNum and afterNum to account for extra hr elements within results in order to continue to paginate by 12 results at a time

updates expected classname for filters container element

* update search filters partial

updates classnames of hr tags

* update search-result-img-container css class

adds img tag styling

* update search-result-img-container css class

updates background-color to theme-color-base-lightest

* update search js

refactors logic responsible for building search results and fetching images to build each one only once and store in an accumulator to be reused rather than rebuilding results every time the search changes

* update search feature specs

* update search page js function buildSearchResult

removes unnecessary div id

* update search spec to use js driver for cache tests

* update breadcrumbs spec

removed aria-hidden-true from search result links

* add preventFocusShift to search js

function prevents window focus shift when clicking filter checkboxes

* update id of search filters div

* update ids of search filter container divs

* remove comments

* remove reference to old filter clear button from search js

* update pagination of search results to add line separators above instead of below

shortens pagination count so bottom result shows no separator line

* remove example markup from search partial

* update search image js to remove alt attr for images added dynamically

* remove aria labels from search sort options

* remove unnecessary accumulator from search js function searchPracticesPage

* update search page js to utilize global var for search results element

* add border-top to dm-search-result css class

* remove hr tag insert from search results generated by buildSearchResults function

* update search_filters html to use bottom-border classes rather than hr tags

* update padding for wrapper div returned by buildSearchResult

* update search js logic for clear filters button to clear comboboxes without shifting focus

* update id for clear search filters button

* update search spec to expect new id of filter reset button and clear cache before each test
@PhilipDeFraties PhilipDeFraties force-pushed the dm-5109-additional-search-filters-accessibility branch from fecfd9f to c836d94 Compare August 22, 2024 00:08
@PhilipDeFraties PhilipDeFraties self-assigned this Aug 22, 2024
@PhilipDeFraties PhilipDeFraties marked this pull request as ready for review August 22, 2024 00:11
Base automatically changed from feature/DM-4866-search-results-refresh to master August 22, 2024 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants