From fed8c2e556a0553643144c97069adb97416bce64 Mon Sep 17 00:00:00 2001 From: Amberroseweeks Date: Wed, 9 Oct 2024 14:44:15 -0400 Subject: [PATCH 1/9] adding focus and keyboard accessibility to the cookie consent buttons --- src/components/CookieConsentBanner.tsx | 31 ++++++++++++++++++++++---- src/components/Footer.tsx | 13 ++++++----- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/components/CookieConsentBanner.tsx b/src/components/CookieConsentBanner.tsx index 767d1676..b620a852 100644 --- a/src/components/CookieConsentBanner.tsx +++ b/src/components/CookieConsentBanner.tsx @@ -3,12 +3,15 @@ import { ThemeButton } from "./ThemeButton"; import { Check, X } from "@phosphor-icons/react"; import { useCookieContext } from "@/context/CookieContext"; -import { useEffect, useState } from "react"; +import { useEffect, useState, useRef } from "react"; const CookieConsentBanner = () => { const { shouldShowBanner, setShouldAllowCookies, setShouldShowBanner } = useCookieContext(); + const bannerRef = useRef(null); + const inputRef = useRef(null); + const [isClientSide, setIsClientSide] = useState(false); useEffect(() => { @@ -21,10 +24,24 @@ const CookieConsentBanner = () => { setShouldShowBanner(false); }; + useEffect(() => { + // Focus on the banner when it becomes visible + if (shouldShowBanner && bannerRef.current) { + // Use setTimeout to ensure focus is applied after DOM updates + setTimeout(() => { + bannerRef.current?.focus(); + }, 0); + } + }, [shouldShowBanner]); // Trigger focus when shouldShowBanner changes + if (!isClientSide) return null; return (
{ }`} >
-
Can we store cookies to your browser?
+
- This provides you a nice experience preserving your filtering, your - position on the map and your property saved list. +

+ This provides you a nice experience preserving your filtering, your + position on the map and your property saved list. +

} @@ -49,6 +71,7 @@ const CookieConsentBanner = () => { /> } diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 9a0ab52c..ba2fa799 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -2,6 +2,7 @@ import { useCookieContext } from "@/context/CookieContext"; import CookieConsentBanner from "./CookieConsentBanner"; +import { ThemeButton } from "./ThemeButton"; import Link from "next/link"; const Footer = () => { @@ -25,12 +26,12 @@ const Footer = () => {
  • - - Cookie Settings - +
  • From a9a44f3145c291bc7f81f27c958bbac3b9e61f51 Mon Sep 17 00:00:00 2001 From: Amberroseweeks Date: Thu, 10 Oct 2024 15:32:57 -0400 Subject: [PATCH 2/9] add role of checkbox and label to group --- src/components/Filters/Panels.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Filters/Panels.tsx b/src/components/Filters/Panels.tsx index 0a838e63..0a090b26 100644 --- a/src/components/Filters/Panels.tsx +++ b/src/components/Filters/Panels.tsx @@ -84,6 +84,8 @@ const Panels: FC = ({ return ( toggleDimensionForPanel(panel.dimension, panel.property)} @@ -109,7 +111,11 @@ const Panels: FC = ({ ); }); - return
    {optionPanels}
    ; + return ( +
    + {optionPanels} +
    + ); }; export default Panels; From 038fa9ed340aa982a94d3f9b5aee2d1d4abcf276 Mon Sep 17 00:00:00 2001 From: Amberroseweeks Date: Fri, 18 Oct 2024 13:44:25 -0400 Subject: [PATCH 3/9] updating to use dynamic labels targetings the h2 --- src/components/Filters/DimensionFilter.tsx | 37 ++++++++++++++-------- src/components/Filters/Panels.tsx | 6 +--- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/components/Filters/DimensionFilter.tsx b/src/components/Filters/DimensionFilter.tsx index f099afe5..51dfc512 100644 --- a/src/components/Filters/DimensionFilter.tsx +++ b/src/components/Filters/DimensionFilter.tsx @@ -19,9 +19,9 @@ type OptionDisplayMapping = { }; const optionsDisplayMapping: OptionDisplayMapping = { - "llc_owner": { - "Yes": "Business", - "No": "Individual", + llc_owner: { + Yes: "Business", + No: "Individual", }, }; @@ -37,16 +37,21 @@ const DimensionFilter: FC = ({ appFilter[property]?.values || [] ); const initialSelectedPanelKeys = () => { - let panelKeyObj: {[key: string]: string[]} = {} + let panelKeyObj: { [key: string]: string[] } = {}; for (const key in appFilter) { - panelKeyObj[key] = appFilter[key].values + panelKeyObj[key] = appFilter[key].values; } - return panelKeyObj - } - const [selectedPanelKeys, setSelectedPanelkeys] = useState<{[property: string]: string[]}>(initialSelectedPanelKeys()) - - const toggleDimensionForPanel = (dimension: string, panel_property: string) => { - let newSelectedPanelKeys + return panelKeyObj; + }; + const [selectedPanelKeys, setSelectedPanelkeys] = useState<{ + [property: string]: string[]; + }>(initialSelectedPanelKeys()); + + const toggleDimensionForPanel = ( + dimension: string, + panel_property: string + ) => { + let newSelectedPanelKeys; if (selectedPanelKeys[panel_property]) { newSelectedPanelKeys = selectedPanelKeys[panel_property].includes( dimension @@ -121,6 +126,8 @@ const DimensionFilter: FC = ({ } }, [selectedKeys, selectedPanelKeys]); + const filterLabelID = display.replace(/\s/g, ""); + const filterDescription = property === "priority_level" ? { @@ -130,13 +137,15 @@ const DimensionFilter: FC = ({ : { desc: "Find properties based on what we think is the easiest method to get legal access to them, based on the data available to us. ", linkFragment: "access-method", - }; + }; // text-gray-500, 600 ? or #586266 (figma)? return (
    -

    {display}

    +

    + {display} +

    {(property === "get_access" || property === "priority_level") && (

    {filterDescription.desc} @@ -150,7 +159,7 @@ const DimensionFilter: FC = ({

    )}
    - {filter} +
    {filter}
    ); }; diff --git a/src/components/Filters/Panels.tsx b/src/components/Filters/Panels.tsx index 0a090b26..38a0b371 100644 --- a/src/components/Filters/Panels.tsx +++ b/src/components/Filters/Panels.tsx @@ -111,11 +111,7 @@ const Panels: FC = ({ ); }); - return ( -
    - {optionPanels} -
    - ); + return
    {optionPanels}
    ; }; export default Panels; From 4f04f2c8346f9059689d97e2bca078b65ff710f9 Mon Sep 17 00:00:00 2001 From: vinhyan Date: Tue, 29 Oct 2024 19:32:04 -0400 Subject: [PATCH 4/9] fix donate option not visible in mobile nav dropdown --- src/app/globals.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/globals.css b/src/app/globals.css index be7a272c..3894e118 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -176,7 +176,7 @@ -webkit-transform: translateZ(0); } .mobileIconLinkNav { - @apply px-0 text-base max-h-52 overflow-hidden fixed w-full z-50 shadow-2xl rounded-md border-1 border-gray-200 bg-gray-0; + @apply px-0 text-base max-h-64 overflow-hidden fixed w-full z-50 shadow-2xl rounded-md border-1 border-gray-200 bg-gray-0; transform: translateZ(0); -webkit-transform: translateZ(0); } From 16d44087127ed6ab8199f220f7d07720fe5d6a29 Mon Sep 17 00:00:00 2001 From: Amberroseweeks Date: Sat, 2 Nov 2024 07:16:21 -0400 Subject: [PATCH 5/9] fixing eslint errors - no errors --- package-lock.json | 187 +++++++++++---------- package.json | 6 +- src/components/Filters/DimensionFilter.tsx | 8 +- src/components/Filters/Panels.tsx | 1 + src/components/PropertyDetailSection.tsx | 9 +- 5 files changed, 117 insertions(+), 94 deletions(-) diff --git a/package-lock.json b/package-lock.json index 85ee5b38..9d529c49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "multi-range-slider-react": "^2.0.5", "next": "^14.0.3", "pmtiles": "^3.0.5", - "postcss": "8.4.29", + "postcss": "^8.4.47", "protobufjs": "^7.2.5", "react": "18.2.0", "react-dom": "18.2.0", @@ -40,7 +40,7 @@ "@types/react": "^18.2.69", "@types/react-dom": "^18.2.22", "@typescript-eslint/parser": "^7.1.1", - "eslint": "^8.57.0", + "eslint": "^8.57.1", "eslint-config-next": "^14.2.2", "eslint-config-prettier": "^9.1.0", "eslint-plugin-custom-rules": "file:./eslint-plugin-custom-rules", @@ -1257,9 +1257,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1318,12 +1318,13 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -1367,9 +1368,10 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true }, "node_modules/@img/sharp-darwin-arm64": { @@ -2069,9 +2071,9 @@ } }, "node_modules/@next/env": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.4.tgz", - "integrity": "sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ==" + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.16.tgz", + "integrity": "sha512-fLrX5TfJzHCbnZ9YUSnGW63tMV3L4nSfhgOQ0iCcX21Pt+VSTDuaLsSuL8J/2XAiVA5AnzvXDpf6pMs60QxOag==" }, "node_modules/@next/eslint-plugin-next": { "version": "14.2.2", @@ -2105,9 +2107,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.4.tgz", - "integrity": "sha512-ubmUkbmW65nIAOmoxT1IROZdmmJMmdYvXIe8211send9ZYJu+SqxSnJM4TrPj9wmL6g9Atvj0S/2cFmMSS99jg==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.16.tgz", + "integrity": "sha512-uFT34QojYkf0+nn6MEZ4gIWQ5aqGF11uIZ1HSxG+cSbj+Mg3+tYm8qXYd3dKN5jqKUm5rBVvf1PBRO/MeQ6rxw==", "cpu": [ "arm64" ], @@ -2120,9 +2122,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.4.tgz", - "integrity": "sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.16.tgz", + "integrity": "sha512-mCecsFkYezem0QiZlg2bau3Xul77VxUD38b/auAjohMA22G9KTJneUYMv78vWoCCFkleFAhY1NIvbyjj1ncG9g==", "cpu": [ "x64" ], @@ -2135,9 +2137,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.4.tgz", - "integrity": "sha512-457G0hcLrdYA/u1O2XkRMsDKId5VKe3uKPvrKVOyuARa6nXrdhJOOYU9hkKKyQTMru1B8qEP78IAhf/1XnVqKA==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.16.tgz", + "integrity": "sha512-yhkNA36+ECTC91KSyZcgWgKrYIyDnXZj8PqtJ+c2pMvj45xf7y/HrgI17hLdrcYamLfVt7pBaJUMxADtPaczHA==", "cpu": [ "arm64" ], @@ -2150,9 +2152,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.4.tgz", - "integrity": "sha512-l/kMG+z6MB+fKA9KdtyprkTQ1ihlJcBh66cf0HvqGP+rXBbOXX0dpJatjZbHeunvEHoBBS69GYQG5ry78JMy3g==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.16.tgz", + "integrity": "sha512-X2YSyu5RMys8R2lA0yLMCOCtqFOoLxrq2YbazFvcPOE4i/isubYjkh+JCpRmqYfEuCVltvlo+oGfj/b5T2pKUA==", "cpu": [ "arm64" ], @@ -2165,9 +2167,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.4.tgz", - "integrity": "sha512-BapIFZ3ZRnvQ1uWbmqEGJuPT9cgLwvKtxhK/L2t4QYO7l+/DxXuIGjvp1x8rvfa/x1FFSsipERZK70pewbtJtw==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.16.tgz", + "integrity": "sha512-9AGcX7VAkGbc5zTSa+bjQ757tkjr6C/pKS7OK8cX7QEiK6MHIIezBLcQ7gQqbDW2k5yaqba2aDtaBeyyZh1i6Q==", "cpu": [ "x64" ], @@ -2180,9 +2182,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.4.tgz", - "integrity": "sha512-mqVxTwk4XuBl49qn2A5UmzFImoL1iLm0KQQwtdRJRKl21ylQwwGCxJtIYo2rbfkZHoSKlh/YgztY0qH3wG1xIg==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.16.tgz", + "integrity": "sha512-Klgeagrdun4WWDaOizdbtIIm8khUDQJ/5cRzdpXHfkbY91LxBXeejL4kbZBrpR/nmgRrQvmz4l3OtttNVkz2Sg==", "cpu": [ "x64" ], @@ -2195,9 +2197,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.4.tgz", - "integrity": "sha512-xzxF4ErcumXjO2Pvg/wVGrtr9QQJLk3IyQX1ddAC/fi6/5jZCZ9xpuL9Tzc4KPWMFq8GGWFVDMshZOdHGdkvag==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.16.tgz", + "integrity": "sha512-PwW8A1UC1Y0xIm83G3yFGPiOBftJK4zukTmk7DI1CebyMOoaVpd8aSy7K6GhobzhkjYvqS/QmzcfsWG2Dwizdg==", "cpu": [ "arm64" ], @@ -2210,9 +2212,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.4.tgz", - "integrity": "sha512-WZiz8OdbkpRw6/IU/lredZWKKZopUMhcI2F+XiMAcPja0uZYdMTZQRoQ0WZcvinn9xZAidimE7tN9W5v9Yyfyw==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.16.tgz", + "integrity": "sha512-jhPl3nN0oKEshJBNDAo0etGMzv0j3q3VYorTSFqH1o3rwv1MQRdor27u1zhkgsHPNeY1jxcgyx1ZsCkDD1IHgg==", "cpu": [ "ia32" ], @@ -2225,9 +2227,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.4.tgz", - "integrity": "sha512-4Rto21sPfw555sZ/XNLqfxDUNeLhNYGO2dlPqsnuCg8N8a2a9u1ltqBOPQ4vj1Gf7eJC0W2hHG2eYUHuiXgY2w==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.16.tgz", + "integrity": "sha512-OA7NtfxgirCjfqt+02BqxC3MIgM/JaGjw9tOe4fyZgPsqfseNiMPnCRP44Pfs+Gpo9zPN+SXaFsgP6vk8d571A==", "cpu": [ "x64" ], @@ -4646,6 +4648,11 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==" + }, "node_modules/@swc/helpers": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.7.tgz", @@ -5371,11 +5378,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -6351,16 +6358,17 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -7063,9 +7071,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -8582,11 +8590,11 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -8721,12 +8729,12 @@ "dev": true }, "node_modules/next": { - "version": "14.1.4", - "resolved": "https://registry.npmjs.org/next/-/next-14.1.4.tgz", - "integrity": "sha512-1WTaXeSrUwlz/XcnhGTY7+8eiaFvdet5z9u3V2jb+Ek1vFo0VhHKSAIJvDWfQpttWjnyw14kBeq28TPq7bTeEQ==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.16.tgz", + "integrity": "sha512-LcO7WnFu6lYSvCzZoo1dB+IO0xXz5uEv52HF1IUN0IqVTUIZGHuuR10I5efiLadGt+4oZqTcNZyVVEem/TM5nA==", "dependencies": { - "@next/env": "14.1.4", - "@swc/helpers": "0.5.2", + "@next/env": "14.2.16", + "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "graceful-fs": "^4.2.11", @@ -8740,18 +8748,19 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.1.4", - "@next/swc-darwin-x64": "14.1.4", - "@next/swc-linux-arm64-gnu": "14.1.4", - "@next/swc-linux-arm64-musl": "14.1.4", - "@next/swc-linux-x64-gnu": "14.1.4", - "@next/swc-linux-x64-musl": "14.1.4", - "@next/swc-win32-arm64-msvc": "14.1.4", - "@next/swc-win32-ia32-msvc": "14.1.4", - "@next/swc-win32-x64-msvc": "14.1.4" + "@next/swc-darwin-arm64": "14.2.16", + "@next/swc-darwin-x64": "14.2.16", + "@next/swc-linux-arm64-gnu": "14.2.16", + "@next/swc-linux-arm64-musl": "14.2.16", + "@next/swc-linux-x64-gnu": "14.2.16", + "@next/swc-linux-x64-musl": "14.2.16", + "@next/swc-win32-arm64-msvc": "14.2.16", + "@next/swc-win32-ia32-msvc": "14.2.16", + "@next/swc-win32-x64-msvc": "14.2.16" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", + "@playwright/test": "^1.41.2", "react": "^18.2.0", "react-dom": "^18.2.0", "sass": "^1.3.0" @@ -8760,16 +8769,20 @@ "@opentelemetry/api": { "optional": true }, + "@playwright/test": { + "optional": true + }, "sass": { "optional": true } } }, "node_modules/next/node_modules/@swc/helpers": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", - "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.5.tgz", + "integrity": "sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==", "dependencies": { + "@swc/counter": "^0.1.3", "tslib": "^2.4.0" } }, @@ -9209,9 +9222,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -9258,9 +9271,9 @@ } }, "node_modules/postcss": { - "version": "8.4.29", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", - "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "funding": [ { "type": "opencollective", @@ -9276,9 +9289,9 @@ } ], "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -10958,9 +10971,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "engines": { "node": ">=0.10.0" } diff --git a/package.json b/package.json index f36d6c2b..5842f7c6 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "multi-range-slider-react": "^2.0.5", "next": "^14.0.3", "pmtiles": "^3.0.5", - "postcss": "8.4.29", + "postcss": "^8.4.47", "protobufjs": "^7.2.5", "react": "18.2.0", "react-dom": "18.2.0", @@ -41,11 +41,11 @@ "@types/react": "^18.2.69", "@types/react-dom": "^18.2.22", "@typescript-eslint/parser": "^7.1.1", - "eslint": "^8.57.0", + "eslint": "^8.57.1", "eslint-config-next": "^14.2.2", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-react": "^7.34.1", "eslint-plugin-custom-rules": "file:./eslint-plugin-custom-rules", + "eslint-plugin-react": "^7.34.1", "postcss-nesting": "^12.1.1", "postcss-preset-env": "^9.5.6" } diff --git a/src/components/Filters/DimensionFilter.tsx b/src/components/Filters/DimensionFilter.tsx index 51dfc512..501356af 100644 --- a/src/components/Filters/DimensionFilter.tsx +++ b/src/components/Filters/DimensionFilter.tsx @@ -152,14 +152,18 @@ const DimensionFilter: FC = ({ Learn more{" "}

    )}
    -
    {filter}
    +
    {filter}
    ); }; diff --git a/src/components/Filters/Panels.tsx b/src/components/Filters/Panels.tsx index 38a0b371..9b2c20c3 100644 --- a/src/components/Filters/Panels.tsx +++ b/src/components/Filters/Panels.tsx @@ -86,6 +86,7 @@ const Panels: FC = ({ key={index} role="checkbox" aria-checked={isSelected ? "true" : "false"} + aria-describedby="getAccess" className={isSelected ? "panelSelected " : "panelDefault"} isPressable onPress={() => toggleDimensionForPanel(panel.dimension, panel.property)} diff --git a/src/components/PropertyDetailSection.tsx b/src/components/PropertyDetailSection.tsx index e03f3749..a67859c5 100644 --- a/src/components/PropertyDetailSection.tsx +++ b/src/components/PropertyDetailSection.tsx @@ -242,7 +242,10 @@ const PropertyDetailSection: FC = ({ ) : ( <> -
    {`You are on page ${page}`}
    +
    + {" "} + {`You are on page ${page}`}{" "} +
    {items.map((feature, index) => ( = ({ >

    - {`${((page - 1) * 6) + 1} to ${page === pages ? featuresInView.length : (page * 6)} of ${featuresInView.length}`} + {`${(page - 1) * 6 + 1} to ${ + page === pages ? featuresInView.length : page * 6 + } of ${featuresInView.length}`}

    From db82d6ac57c1b975ed9c739cc6696bcbebbc1a80 Mon Sep 17 00:00:00 2001 From: Amberroseweeks Date: Sat, 2 Nov 2024 08:22:26 -0400 Subject: [PATCH 6/9] improving the checkbox by adding aria describedby and connecting the panel to the header --- src/components/Filters/DimensionFilter.tsx | 24 +++++++++++++++------- src/components/Filters/Panels.tsx | 5 +++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/components/Filters/DimensionFilter.tsx b/src/components/Filters/DimensionFilter.tsx index 0c7f374a..4e6eb080 100644 --- a/src/components/Filters/DimensionFilter.tsx +++ b/src/components/Filters/DimensionFilter.tsx @@ -19,10 +19,9 @@ type OptionDisplayMapping = { }; const optionsDisplayMapping: OptionDisplayMapping = { - owner_type: { - Public: 'Public', - 'Business (LLC)': 'Business (LLC)', - Individual: 'Individual', + llc_owner: { + Yes: 'Business', + No: 'Individual', }, }; @@ -48,6 +47,8 @@ const DimensionFilter: FC = ({ [property: string]: string[]; }>(initialSelectedPanelKeys()); + const filterLabelID = display.replace(/\s/g, ''); + const toggleDimensionForPanel = ( dimension: string, panel_property: string @@ -119,10 +120,13 @@ const DimensionFilter: FC = ({ ); } else if (type === 'panels') { return ( + /* the filterLabelID is pulled from the form field header text and uses aria-describedby to tie each component to the form header label using a unique ID applied to the form area header + */ ); } else { @@ -153,21 +157,27 @@ const DimensionFilter: FC = ({ return (

    -

    {display}

    +

    + {display} +

    {(property === 'get_access' || property === 'priority_level') && (

    {filterDescription.desc} Learn more{' '}

    )}
    - {filter} +
    {filter}
    ); }; diff --git a/src/components/Filters/Panels.tsx b/src/components/Filters/Panels.tsx index 97dc1dce..75153026 100644 --- a/src/components/Filters/Panels.tsx +++ b/src/components/Filters/Panels.tsx @@ -18,6 +18,7 @@ type PanelFilterOptions = PropertyAccessOption & { type PanelsProps = { options: string[] | PropertyAccess[]; selectedPanelKeys: { [property: string]: string[] }; + aria_describedby_label?: string; toggleDimensionForPanel: (dimension: string, property: string) => void; }; @@ -71,6 +72,7 @@ const Panels: FC = ({ options, selectedPanelKeys, toggleDimensionForPanel, + aria_describedby_label, }) => { const optionPanels = options.map((option, index) => { const panel = panel_access_options[option]; @@ -84,6 +86,9 @@ const Panels: FC = ({ return ( toggleDimensionForPanel(panel.dimension, panel.property)} From 362dcde5cdb6d6ffab16e722b11b35100fbb61c1 Mon Sep 17 00:00:00 2001 From: Amberroseweeks Date: Sun, 3 Nov 2024 14:38:29 -0500 Subject: [PATCH 7/9] adding role of checkbox and aria-describedby --- src/components/Filters/ButtonGroup.tsx | 6 +++++- src/components/Filters/DimensionFilter.tsx | 2 ++ src/components/Filters/MultiSelect.tsx | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/Filters/ButtonGroup.tsx b/src/components/Filters/ButtonGroup.tsx index 21ed66d2..38eabc2c 100644 --- a/src/components/Filters/ButtonGroup.tsx +++ b/src/components/Filters/ButtonGroup.tsx @@ -7,6 +7,7 @@ import { Check } from '@phosphor-icons/react'; type ButtonGroupProps = { options: string[]; selectedKeys: string[]; + aria_describedby_label?: string; toggleDimension: (dimension: string) => void; displayOptions?: { [key: string]: string }; }; @@ -15,6 +16,7 @@ const ButtonGroup: FC = ({ options, selectedKeys, toggleDimension, + aria_describedby_label, displayOptions = {}, }) => { return ( @@ -23,6 +25,7 @@ const ButtonGroup: FC = ({