diff --git a/src/components/StyleGuide/Filtering/Accessibility.mdx b/src/components/StyleGuide/Filtering/Accessibility.mdx index ca18cab0b..e5c196895 100644 --- a/src/components/StyleGuide/Filtering/Accessibility.mdx +++ b/src/components/StyleGuide/Filtering/Accessibility.mdx @@ -1,7 +1,16 @@ import { Meta } from "@storybook/blocks"; +import { Box } from "@chakra-ui/react"; +import Image from "../../Image/Image"; import Link from "../../Link/Link"; +import imageFocusLiveFiltering from "/static/filteringStyleGuide/focusLiveFiltering.gif"; +import imageFocusKeywordSearch from "/static/filteringStyleGuide/focusKeywordSearch.gif"; +import imageFocusClearingFilters from "/static/filteringStyleGuide/focusClearingFilters.gif"; +import imageFocusPagination from "/static/filteringStyleGuide/focusPagination.gif"; +import imageFocusSorting from "/static/filteringStyleGuide/focusSorting.gif"; +import { exampleWrapperStyles } from "./Overview.mdx"; + # Filtering accessibility @@ -31,39 +40,119 @@ the heading text are announced to screen reader users. ### Applying search terms -When a search term is applied using the `keyword search` field, focus should be moved -to the `total results` heading. + + + When a search term is applied using the `keyword search` field, focus should + be moved to the `total results` heading. + + Example of full-page filtering app + ### Applying filters #### Live filtering -For live filtering, as a user makes changes to filtering options, focus should -be maintained on the filter the user is interacting with. + + + For live filtering, as a user makes changes to filtering options, focus + should be maintained on the filter the user is interacting with. + + Example of full-page filtering app + #### Batch filtering -For batch filtering, focus should be moved to the `total results` heading after -the "Apply filters" button has been clicked. + + + For batch filtering, focus should be moved to the `total results` heading + after the "Apply filters" button has been clicked. + + + ### Clearing filters -When filters are cleared using the methods available in the `active filters` -list or by clicking the "Clear all filters" button in the `filter bar`, focus -should be moved to the `total results` heading. - -When clearing a filter by manually resetting an individual form input element, -focus should be maintained on the filter the user is interacting with. + + + When filters are cleared using the methods available in the `active filters` + list or by clicking the "Clear all filters" button in the `filter bar`, focus + should be moved to the `total results` heading. + + When clearing a filter by manually resetting an individual form input element, + focus should be maintained on the filter the user is interacting with. + + + Example of full-page filtering app + ### Pagination -When using the `pagination` menu to update the `results` list, focus should be moved -to the `total results` heading. + + + When using the `pagination` menu to update the `results` list, focus should + be moved to the `total results` heading. + + Example of full-page filtering app + ### Sorting -After selecting an option in the `sorting` menu, focus should be maintained on -the `sorting` menu. + + + After selecting an option in the `sorting` menu, focus should be maintained + on the `sorting` menu. + + Example of full-page filtering app + ### Modal overlay diff --git a/src/components/StyleGuide/Filtering/ApplyingClearing.mdx b/src/components/StyleGuide/Filtering/ApplyingClearing.mdx index aebab25f2..968550d63 100644 --- a/src/components/StyleGuide/Filtering/ApplyingClearing.mdx +++ b/src/components/StyleGuide/Filtering/ApplyingClearing.mdx @@ -63,9 +63,9 @@ When filters are cleared, the following should be addressed: ### Keyword search -- All filters that have been applied should be removed any time a keyword search - is executed (i.e. a new keyword search always produces a new unfiltered - results list) +- All filters that have been applied should be programmatically removed any time + a keyword search is executed (i.e. a new keyword search should always produce + a new unfiltered results list) ### Filter bar diff --git a/src/components/StyleGuide/Filtering/PageComposition.mdx b/src/components/StyleGuide/Filtering/PageComposition.mdx index e51336542..b2760cab3 100644 --- a/src/components/StyleGuide/Filtering/PageComposition.mdx +++ b/src/components/StyleGuide/Filtering/PageComposition.mdx @@ -3,7 +3,7 @@ import { Meta } from "@storybook/blocks"; import Image from "../../Image/Image"; import Link from "../../Link/Link"; -import imageFilteringFullPageExample from "/static/filteringStyleGuide/filteringFullPageExample.png"; +import imageFullPageExample from "/static/filteringStyleGuide/fullPageExample.png"; import { exampleWrapperStyles } from "./Overview.mdx"; @@ -24,6 +24,6 @@ UI elements: Example of full-page filtering app diff --git a/src/components/StyleGuide/Filtering/PageCompositionElements/ActiveFilters.mdx b/src/components/StyleGuide/Filtering/PageCompositionElements/ActiveFilters.mdx index 3f8cab176..168803855 100644 --- a/src/components/StyleGuide/Filtering/PageCompositionElements/ActiveFilters.mdx +++ b/src/components/StyleGuide/Filtering/PageCompositionElements/ActiveFilters.mdx @@ -3,7 +3,7 @@ import { Meta } from "@storybook/blocks"; import Image from "../../../Image/Image"; import Link from "../../../Link/Link"; -import imageFilteringActiveFiltersList from "/static/filteringStyleGuide/filteringActiveFiltersList.png"; +import imageActiveFiltersList from "/static/filteringStyleGuide/activeFiltersList.png"; import { exampleWrapperStyles } from "../Overview.mdx"; @@ -14,7 +14,7 @@ The `active filters` list is used to display filters that have been applied. Example of active filters list diff --git a/src/components/StyleGuide/Filtering/PageCompositionElements/FilterBar.mdx b/src/components/StyleGuide/Filtering/PageCompositionElements/FilterBar.mdx index 3dcb58d57..e95ec3c01 100644 --- a/src/components/StyleGuide/Filtering/PageCompositionElements/FilterBar.mdx +++ b/src/components/StyleGuide/Filtering/PageCompositionElements/FilterBar.mdx @@ -5,10 +5,10 @@ import Banner from "../../../Banner/Banner"; import Image from "../../../Image/Image"; import Link from "../../../Link/Link"; -import imageFilteringExampleColumn from "/static/filteringStyleGuide/filteringExampleColumn.png"; -import imageFilteringExamplePopup from "/static/filteringStyleGuide/filteringExamplePopup.png"; -import imageFilteringExampleRow from "/static/filteringStyleGuide/filteringExampleRow.png"; -import imageFilteringFilterBar from "/static/filteringStyleGuide/filteringFilterBar.png"; +import imageExampleColumn from "/static/filteringStyleGuide/exampleColumn.png"; +import imageExamplePopup from "/static/filteringStyleGuide/examplePopup.png"; +import imageExampleRow from "/static/filteringStyleGuide/exampleRow.png"; +import imageFilterBar from "/static/filteringStyleGuide/filterBar.png"; import { exampleWrapperStyles } from "../Overview.mdx"; @@ -22,7 +22,7 @@ following DS components: `CheckboxGroup`, `MultiSelectGroup`, `RadioGroup`, Example of filter bar @@ -86,7 +86,7 @@ or row (horizontal). alt="Example of column filter bar" border="1px solid var(--nypl-colors-ui-border-default)" caption="Example of column filter bar" - src={imageFilteringExampleColumn} + src={imageExampleColumn} {...exampleWrapperStyles} /> @@ -118,7 +118,7 @@ or row (horizontal). alt="Example of row filter bar" border="1px solid var(--nypl-colors-ui-border-default)" caption="Example of row filter bar" - src={imageFilteringExampleRow} + src={imageExampleRow} {...exampleWrapperStyles} /> @@ -141,11 +141,11 @@ or row (horizontal). components to be opened at the same time - Example of popup filters on mobile diff --git a/src/components/StyleGuide/Filtering/PageCompositionElements/KeywordSearch.mdx b/src/components/StyleGuide/Filtering/PageCompositionElements/KeywordSearch.mdx index 94954bd2c..acdfd906c 100644 --- a/src/components/StyleGuide/Filtering/PageCompositionElements/KeywordSearch.mdx +++ b/src/components/StyleGuide/Filtering/PageCompositionElements/KeywordSearch.mdx @@ -3,7 +3,7 @@ import { Meta } from "@storybook/blocks"; import Image from "../../../Image/Image"; import Link from "../../../Link/Link"; -import imageFilteringKeywordSearchField from "/static/filteringStyleGuide/filteringKeywordSearchField.png"; +import imageKeywordSearchField from "/static/filteringStyleGuide/keywordSearchField.png"; import { exampleWrapperStyles } from "../Overview.mdx"; @@ -20,7 +20,7 @@ produced with a keyword search. Example of keyword search field diff --git a/src/components/StyleGuide/Filtering/PageCompositionElements/Pagination.mdx b/src/components/StyleGuide/Filtering/PageCompositionElements/Pagination.mdx index 3d447ee2b..268c78b92 100644 --- a/src/components/StyleGuide/Filtering/PageCompositionElements/Pagination.mdx +++ b/src/components/StyleGuide/Filtering/PageCompositionElements/Pagination.mdx @@ -3,7 +3,7 @@ import { Meta } from "@storybook/blocks"; import Image from "../../../Image/Image"; import Link from "../../../Link/Link"; -import imageFilteringPaginationMenu from "/static/filteringStyleGuide/filteringPaginationMenu.png"; +import imagePaginationMenu from "/static/filteringStyleGuide/paginationMenu.png"; import { exampleWrapperStyles } from "../Overview.mdx"; @@ -15,7 +15,7 @@ multiple pages. Example of pagination menu diff --git a/src/components/StyleGuide/Filtering/PageCompositionElements/ResultsList.mdx b/src/components/StyleGuide/Filtering/PageCompositionElements/ResultsList.mdx index 2d2f86aaf..85d22dc16 100644 --- a/src/components/StyleGuide/Filtering/PageCompositionElements/ResultsList.mdx +++ b/src/components/StyleGuide/Filtering/PageCompositionElements/ResultsList.mdx @@ -3,7 +3,7 @@ import { Meta } from "@storybook/blocks"; import Image from "../../../Image/Image"; import Link from "../../../Link/Link"; -import imageFilteringResultsList from "/static/filteringStyleGuide/filteringResultsList.png"; +import imageResultsList from "/static/filteringStyleGuide/resultsList.png"; import { exampleWrapperStyles } from "../Overview.mdx"; @@ -14,7 +14,7 @@ The `results list` represents the items that are being filtered. Example of results list diff --git a/src/components/StyleGuide/Filtering/PageCompositionElements/SortingMenu.mdx b/src/components/StyleGuide/Filtering/PageCompositionElements/SortingMenu.mdx index 9061d9e91..5fbf15d12 100644 --- a/src/components/StyleGuide/Filtering/PageCompositionElements/SortingMenu.mdx +++ b/src/components/StyleGuide/Filtering/PageCompositionElements/SortingMenu.mdx @@ -3,7 +3,7 @@ import { Meta } from "@storybook/blocks"; import Image from "../../../Image/Image"; import Link from "../../../Link/Link"; -import imageFilteringSortingMenu from "/static/filteringStyleGuide/filteringSortingMenu.png"; +import imageSortingMenu from "/static/filteringStyleGuide/sortingMenu.png"; import { exampleWrapperStyles } from "../Overview.mdx"; @@ -14,7 +14,7 @@ The `sorting` menu updates how records a ordered in a results set. Example of sorting menu diff --git a/src/components/StyleGuide/Filtering/PageCompositionElements/TotalResultsHeading.mdx b/src/components/StyleGuide/Filtering/PageCompositionElements/TotalResultsHeading.mdx index 0df14d082..b30371d0b 100644 --- a/src/components/StyleGuide/Filtering/PageCompositionElements/TotalResultsHeading.mdx +++ b/src/components/StyleGuide/Filtering/PageCompositionElements/TotalResultsHeading.mdx @@ -3,7 +3,7 @@ import { Meta } from "@storybook/blocks"; import Image from "../../../Image/Image"; import Link from "../../../Link/Link"; -import imageFilteringTotalResultsHeading from "/static/filteringStyleGuide/filteringTotalResultsHeading.png"; +import imageTotalResultsHeading from "/static/filteringStyleGuide/totalResultsHeading.png"; import { exampleWrapperStyles } from "../Overview.mdx"; @@ -16,7 +16,7 @@ results set, and, if applicable, the search term used to generate a results set. Example of total results heading diff --git a/static/filteringStyleGuide/filteringActiveFiltersList.png b/static/filteringStyleGuide/activeFiltersList.png similarity index 100% rename from static/filteringStyleGuide/filteringActiveFiltersList.png rename to static/filteringStyleGuide/activeFiltersList.png diff --git a/static/filteringStyleGuide/filteringExampleColumn.png b/static/filteringStyleGuide/exampleColumn.png similarity index 100% rename from static/filteringStyleGuide/filteringExampleColumn.png rename to static/filteringStyleGuide/exampleColumn.png diff --git a/static/filteringStyleGuide/filteringExamplePopup.png b/static/filteringStyleGuide/examplePopup.png similarity index 100% rename from static/filteringStyleGuide/filteringExamplePopup.png rename to static/filteringStyleGuide/examplePopup.png diff --git a/static/filteringStyleGuide/filteringExampleRow.png b/static/filteringStyleGuide/exampleRow.png similarity index 100% rename from static/filteringStyleGuide/filteringExampleRow.png rename to static/filteringStyleGuide/exampleRow.png diff --git a/static/filteringStyleGuide/filteringFilterBar.png b/static/filteringStyleGuide/filterBar.png similarity index 100% rename from static/filteringStyleGuide/filteringFilterBar.png rename to static/filteringStyleGuide/filterBar.png diff --git a/static/filteringStyleGuide/focusClearingFilters.gif b/static/filteringStyleGuide/focusClearingFilters.gif new file mode 100644 index 000000000..a59491832 Binary files /dev/null and b/static/filteringStyleGuide/focusClearingFilters.gif differ diff --git a/static/filteringStyleGuide/focusKeywordSearch.gif b/static/filteringStyleGuide/focusKeywordSearch.gif new file mode 100644 index 000000000..71489bcce Binary files /dev/null and b/static/filteringStyleGuide/focusKeywordSearch.gif differ diff --git a/static/filteringStyleGuide/focusLiveFiltering.gif b/static/filteringStyleGuide/focusLiveFiltering.gif new file mode 100644 index 000000000..c65093cc6 Binary files /dev/null and b/static/filteringStyleGuide/focusLiveFiltering.gif differ diff --git a/static/filteringStyleGuide/focusPagination.gif b/static/filteringStyleGuide/focusPagination.gif new file mode 100644 index 000000000..9840ec939 Binary files /dev/null and b/static/filteringStyleGuide/focusPagination.gif differ diff --git a/static/filteringStyleGuide/focusSorting.gif b/static/filteringStyleGuide/focusSorting.gif new file mode 100644 index 000000000..2124e3286 Binary files /dev/null and b/static/filteringStyleGuide/focusSorting.gif differ diff --git a/static/filteringStyleGuide/filteringFullPageExample.png b/static/filteringStyleGuide/fullPageExample.png similarity index 100% rename from static/filteringStyleGuide/filteringFullPageExample.png rename to static/filteringStyleGuide/fullPageExample.png diff --git a/static/filteringStyleGuide/filteringKeywordSearchField.png b/static/filteringStyleGuide/keywordSearchField.png similarity index 100% rename from static/filteringStyleGuide/filteringKeywordSearchField.png rename to static/filteringStyleGuide/keywordSearchField.png diff --git a/static/filteringStyleGuide/filteringPaginationMenu.png b/static/filteringStyleGuide/paginationMenu.png similarity index 100% rename from static/filteringStyleGuide/filteringPaginationMenu.png rename to static/filteringStyleGuide/paginationMenu.png diff --git a/static/filteringStyleGuide/filteringResultsList.png b/static/filteringStyleGuide/resultsList.png similarity index 100% rename from static/filteringStyleGuide/filteringResultsList.png rename to static/filteringStyleGuide/resultsList.png diff --git a/static/filteringStyleGuide/filteringSortingMenu.png b/static/filteringStyleGuide/sortingMenu.png similarity index 100% rename from static/filteringStyleGuide/filteringSortingMenu.png rename to static/filteringStyleGuide/sortingMenu.png diff --git a/static/filteringStyleGuide/filteringTotalResultsHeading.png b/static/filteringStyleGuide/totalResultsHeading.png similarity index 100% rename from static/filteringStyleGuide/filteringTotalResultsHeading.png rename to static/filteringStyleGuide/totalResultsHeading.png