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

[Prod] Handle duplicate programs; test with CSS; merge duplicate AROs; update vulnerable dependencies #2363

Merged
merged 36 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4aefe9a
Test HTML with CSS
thewatermethod Apr 22, 2024
e9f1662
Update .env
thewatermethod Apr 22, 2024
25ceffb
All envs have the var, JIC
thewatermethod Apr 26, 2024
1b07270
Bump undici from 5.19.1 to 5.28.4
dependabot[bot] Apr 30, 2024
3317ec1
Update ignored dependencies
kryswisnaskas Apr 30, 2024
7244c09
Merge remote-tracking branch 'origin/main' into mb/TTAHUB/revenge-css
thewatermethod Jul 23, 2024
8d4924d
Take the rest of my revenge
thewatermethod Jul 23, 2024
64ca1a5
Fixes, turn off errors & warnings by default
thewatermethod Jul 23, 2024
3caf791
merge duped AROs
Aug 30, 2024
a443f9b
update dupe logic
Aug 30, 2024
a6250eb
Update resultions to add axios 1.7.4 or greater.
kryswisnaskas Sep 3, 2024
f48b50f
Bump micromatch from 4.0.7 to 4.0.8 in /frontend
dependabot[bot] Sep 4, 2024
248491b
Update known vulnerabilities
kryswisnaskas Sep 5, 2024
5a60a84
Merge pull request #2351 from HHS/dependabot/npm_and_yarn/frontend/mi…
dependabot[bot] Sep 5, 2024
9d9d7bd
Bump undici from 5.19.1 to 5.28.4
dependabot[bot] Sep 5, 2024
107238a
Merge branch 'dependabot/npm_and_yarn/undici-5.28.4' of https://githu…
kryswisnaskas Sep 5, 2024
04afdb3
Merge pull request #2077 from HHS/dependabot/npm_and_yarn/undici-5.28.4
dependabot[bot] Sep 5, 2024
ff251b6
add unique constraint on ActivityReportObjectives
Sep 6, 2024
1159b2c
Merge branch 'main' into ttahub-3113/merge_dupe_aros
Sep 6, 2024
dc30593
remove unique constraint that caused test failures
Sep 9, 2024
0666833
Merge pull request #2345 from HHS/ttahub-3113/merge_dupe_aros
hardwarehuman Sep 9, 2024
338540e
Force resolutions for fast-xml-parser and ws
kryswisnaskas Sep 9, 2024
fee3759
Merge branch 'main' into kw-update-resolutions
kryswisnaskas Sep 9, 2024
58b6b7f
Update known dependencies
kryswisnaskas Sep 9, 2024
e4902c2
update yarn.lock
kryswisnaskas Sep 9, 2024
80330d4
Add additional packages to resolutions
thewatermethod Sep 11, 2024
b627e21
Update package on FE but still need to ignore it
thewatermethod Sep 11, 2024
429d568
Prevent program duplicates on HSES import
kryswisnaskas Sep 11, 2024
1db64d4
Merge pull request #2357 from HHS/kw-update-resolutions
thewatermethod Sep 11, 2024
8ea1684
Merge pull request #2109 from HHS/mb/TTAHUB/revenge-css
thewatermethod Sep 11, 2024
25f8183
Fix lint errors
kryswisnaskas Sep 11, 2024
017772b
Remove two lines from yarn audit that cause a failure
thewatermethod Sep 11, 2024
aab3345
Add trailing comma
kryswisnaskas Sep 11, 2024
fc53441
Merge pull request #2361 from HHS/mb/update-yarn-audit
thewatermethod Sep 11, 2024
ec1180c
Merge branch 'main' into kw-fix-duplicate-programs
kryswisnaskas Sep 11, 2024
df6c32b
Merge pull request #2362 from HHS/kw-fix-duplicate-programs
kryswisnaskas Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ jobs:
REACT_APP_GTM_AUTH: $SANDBOX_GTM_AUTH
REACT_APP_GTM_PREVIEW: $SANDBOX_GTM_PREVIEW
REACT_APP_WEBSOCKET_URL: wss://tta-smarthub-sandbox.app.cloud.gov
REACT_APP_INCLUDE_ACCESSIBILITY_CSS: 'false'
- cf_deploy:
app_name: tta-smarthub-sandbox
auth_client_id: SANDBOX_AUTH_CLIENT_ID
Expand Down Expand Up @@ -1055,6 +1056,7 @@ jobs:
REACT_APP_GTM_AUTH: $DEV_GTM_AUTH
REACT_APP_GTM_PREVIEW: $DEV_GTM_PREVIEW
REACT_APP_WEBSOCKET_URL: wss://tta-smarthub-dev.app.cloud.gov
REACT_APP_INCLUDE_ACCESSIBILITY_CSS: 'false'
- cf_deploy:
app_name: tta-smarthub-dev
auth_client_id: DEV_AUTH_CLIENT_ID
Expand Down Expand Up @@ -1122,6 +1124,7 @@ jobs:
REACT_APP_GTM_AUTH: $STAGING_GTM_AUTH
REACT_APP_GTM_PREVIEW: $STAGING_GTM_PREVIEW
REACT_APP_WEBSOCKET_URL: wss://tta-smarthub-staging.app.cloud.gov
REACT_APP_INCLUDE_ACCESSIBILITY_CSS: 'false'
- cf_deploy:
app_name: tta-smarthub-staging
auth_client_id: STAGING_AUTH_CLIENT_ID
Expand Down Expand Up @@ -1187,6 +1190,7 @@ jobs:
REACT_APP_GTM_AUTH: $PROD_GTM_AUTH
REACT_APP_GTM_PREVIEW: $PROD_GTM_PREVIEW
REACT_APP_WEBSOCKET_URL: wss://ttahub.ohs.acf.hhs.gov
REACT_APP_INCLUDE_ACCESSIBILITY_CSS: 'false'
- cf_deploy:
app_name: tta-smarthub-prod
auth_client_id: PROD_AUTH_CLIENT_ID
Expand Down
2 changes: 2 additions & 0 deletions frontend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ REACT_APP_GTM_ENABLED=false
REACT_APP_GTM_ID=GTM-MKSDS7M
REACT_APP_GTM_AUTH=mET4lHjc_AMQrlW4QXiCcA
REACT_APP_GTM_PREVIEW=env-6

REACT_APP_INCLUDE_ACCESSIBILITY_CSS=false
5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"url-join": "^4.0.1",
"use-deep-compare-effect": "^1.6.1",
"uuid": "^8.3.2",
"micromatch": "^4.0.7"
"micromatch": "^4.0.8"
},
"engines": {
"node": "18.20.3"
Expand Down Expand Up @@ -101,7 +101,8 @@
"yaml": "^2.2.2",
"semver": "^7.5.3",
"es5-ext": "^0.10.63",
"braces": "^3.0.3"
"braces": "^3.0.3",
"path-to-regexp": "^1.9.0"
},
"eslintConfig": {
"root": true,
Expand Down
109 changes: 109 additions & 0 deletions frontend/public/accessibility-errors.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/**

Approach & code taken from Heydon Pickering's article on testing HTML with modern CSS
https://heydonworks.com/article/testing-html-with-modern-css/

**/

:root {
--error-outline: 0.25rem solid red;
--warning-outline: 0.25rem solid orange;
}

a:not([href]) {
outline: var(--error-outline);
--error: 'The link does not have an href. Did you mean to use a <button>?';
}

a[href^="javascript"] {
outline: var(--error-outline);
--error-javascript-href: 'The href does not appear to include a location. Did you mean to use a <button>?';
}

a[disabled] {
outline: var(--error-outline);
--error-anchor-disabled: 'The disabled property is not valid on anchors (links). Did you mean to use a <button>?';
}

label:not(:has(:is(input,output,textarea,select))):not([for]) {
outline: var(--error-outline);
--error-unassociated-label: 'The <label> neither uses the `for` attribute nor wraps an applicable form element'
}

input:not(form input) {
outline: var(--warning-outline);
--error-input-orphan: 'The input is outside a <form> element. Users may benefit from <form> semantics and behaviors.'
}

body :not(:is(header,nav,main,[role="main"],aside,footer)):not(:is(header,nav,[role="main"],main,aside,footer) *):not(.skip-link) {
outline: var(--error-outline);
--error-content-outside-landmark: 'You have some content that is not inside a landmark (header, nav, main, aside, or footer)';
}

/**
* Crazy tabindexing
----------------------------------------------------------------------
*/

[tabindex]:not([tabindex="0"]):not([tabindex="-1"]) {
outline: var(--error-outline);
--error-bad-tabindexing: 'Do not disrupt the natural tab order';
}

/**
* <div>s in the wrong places
----------------------------------------------------------------------
*/

abbr div, b div, i div, span div, em div,
strong div, small div, cite div, q div, code div,
label div {
outline: var(--error-outline);
--error-divs-inside-inline: 'Do not put <div>s inside inline elements.';
}

/**
* List errors
----------------------------------------------------------------------
*/

ol > *:not(li),
ul > *:not(li) {
outline: var(--error-outline);
--error-invalid-list-children: 'Only <li> can be a direct child of <ul> or <ol>.';
}

dl > *:not(dt):not(dd) {
outline: var(--error-outline);
--error-invalid-elements-inside-definition-list: 'This element does not belong directly inside a definition list.';
}

dt + *:not(dd) {
outline: var(--error-outline);
--error-definition-must-follow-title: 'Definitions must follow definition titles.';
}

/**
* Empty elements
----------------------------------------------------------------------
*/

*:empty:not(script):not(input):not(br):not(img):not(link):not(hr):not(embed):not(area):not(command):not(col):not(param):not(source):not(track):not(wbr):not(base):not(keygen):not([aria-hidden="true"]):not(svg):not(svg *) {
outline: var(--warning-outline);
--warning-empty-element: 'This element is empty. Why?';
}

/**
* Form errors
----------------------------------------------------------------------
*/

form:not([action]) {
outline: var(--error-outline);
--error-form-missing-action: 'Forms must have action attributes.';
}

fieldset > *:first-child:not(legend) {
outline: var(--error-outline);
--error-fieldset-missing-legend: 'Place a legend as the first element in this fieldset.';
}
5 changes: 5 additions & 0 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,10 @@
})(window,document,'script','dataLayer', '%REACT_APP_GTM_ID%');</script>
<!-- End Google Tag Manager -->
<% } %>

<% if (process.env.REACT_APP_INCLUDE_ACCESSIBILITY_CSS === 'true') { %>
<link rel="stylesheet" href="%PUBLIC_URL%/accessibility-errors.css">
<% } %>

</body>
</html>
Loading