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

Masked input test #56

Draft
wants to merge 352 commits into
base: audit-2024
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
352 commits
Select commit Hold shift + click to select a range
36ccd95
Add comments around formatting and commits
May 24, 2024
0f63630
Merge pull request #85 from PublicisSapient/add-automatic-formatting-2
zoltan-dulac May 24, 2024
75f9248
Add README info about contributing and PRs
May 24, 2024
a4438bd
Apply automatic formatting to all files
May 24, 2024
58395b0
Merge pull request #87 from PublicisSapient/apply-automatic-formatting
zoltan-dulac May 24, 2024
62e488a
Merge branch 'main' into add-pr-info-to-readme
zoltan-dulac May 24, 2024
521677a
Merge pull request #86 from PublicisSapient/add-pr-info-to-readme
alisonhall May 28, 2024
ece1611
Merge branch 'main' into add-table-of-contents-to-pages
May 28, 2024
3a64603
Move the TOC code into a separate module file
May 28, 2024
819906b
Handle scenario when h1 is not first heading
May 28, 2024
e2c816d
Adding npm publish information.
zoltan-dulac May 29, 2024
7854e1c
Merge pull request #105 from PublicisSapient/dev-notes-2024
zoltan-dulac May 29, 2024
c51ee17
Improve TOC component and styling
May 29, 2024
6256d0a
Fix site nav styling selector
May 29, 2024
c3276d9
Fix HTML example button listener to only work on example
May 29, 2024
6e58fca
Use the automatically changed CSS file formatting
May 30, 2024
b315e36
Merge pull request #107 from PublicisSapient/update-css-formatting
alisonhall May 30, 2024
7a8a22a
Merge branch 'main' into add-table-of-contents-to-pages
May 30, 2024
9565695
Update the location of the enable-toc stylesheet, update generated css
May 30, 2024
23f08b8
Load the enable-toc stylesheet on all pages
May 30, 2024
0b25bf7
Use BEM for enable-toc classes and IDs
May 30, 2024
bb89fba
Fix conflicting specificity of nav styles
May 30, 2024
feef5e2
Remove extra lines
May 30, 2024
83ba360
Add tooltip content to explaing the toggle TOC button
May 30, 2024
e67f502
Close toggled TOC when clicking outside
May 30, 2024
1c0268b
Close toggled TOC on escape key or focusing outside TOC
May 30, 2024
121c5a9
Fixed #67: Needed to make folder for cache if not there.
AbsentSemicolon Jun 4, 2024
b980505
Merge pull request #111 from PublicisSapient/fix-marquee-demo
zoltan-dulac Jun 4, 2024
69cc56e
Fixed PHP binPath for windows users
lunarias Jun 4, 2024
213880c
Fix the command to format files on pre-commit
Jun 4, 2024
a40e337
Format existing files
Jun 4, 2024
3987b17
Fix the link comment format
Jun 4, 2024
8d2cfbe
Merge pull request #114 from PublicisSapient/fix-format-precommit
alisonhall Jun 4, 2024
2ec0b8e
test commit for readme file
josiahwilliams Jun 5, 2024
6e56402
test commit for new github userid
josiahwilliams Jun 5, 2024
f0275bf
Adding additional instructions for Java install
josiahwilliams Jun 5, 2024
e3fe8b8
Updates info for testing
josiahwilliams Jun 5, 2024
3843530
Updates Java install instructions. Clarifies local server for tests
josiahwilliams Jun 5, 2024
fbae215
removing : and space between asterik
Neha-Singla Jun 5, 2024
4ef405f
Merge pull request #115 from PublicisSapient/chore/update-readme
josiahwilliams Jun 6, 2024
eea84f0
Merge branch 'main' into binPath-fixed
josiahwilliams Jun 6, 2024
37979f9
Merge pull request #112 from PublicisSapient/binPath-fixed
lunarias Jun 6, 2024
2458cbe
commiting asterik space fix
Neha-Singla Jun 6, 2024
d738a6b
Merge branch 'main' into 89-vd-change-form-error-checking-page
Neha-Singla Jun 6, 2024
4739fb3
PR comments
Neha-Singla Jun 6, 2024
49b87fa
Merge branch '89-vd-change-form-error-checking-page' of https://githu…
Neha-Singla Jun 6, 2024
ca74582
Issue#49 - fix the grammer / spelling mistake issue on form checking …
akshaypanchal Jun 7, 2024
db7d3c6
Issue#49 - fix the grammer / spelling mistakes issue on focus styling…
akshaypanchal Jun 7, 2024
4b9c4ed
feat: test cases for the Tab component
mahesh0618 Jun 7, 2024
3ec8baf
Issue#49 - fix the grammer / spelling mistake issue on typography page
akshaypanchal Jun 7, 2024
908a09a
Issu#49 - fix the grammar / spelling issue on rest of the code patter…
akshaypanchal Jun 7, 2024
fc3fd5d
feat: Adding icons next to headings to have summarized info
shiprarawal Jun 7, 2024
c2a3e35
Update content/body/form-error-checking.php
zoltan-dulac Jun 7, 2024
02256a9
Update content/body/form-error-checking.php
zoltan-dulac Jun 7, 2024
6541d21
Update content/body/form-error-checking.php
zoltan-dulac Jun 7, 2024
2154f44
update: look for appropriate ARIA attrs
mahesh0618 Jun 7, 2024
27d66cf
Update content/body/focus-styling.php
akshaypanchal Jun 10, 2024
5d0d625
Update content/body/text-resize.php
akshaypanchal Jun 10, 2024
d2b46af
Update content/body/log.php
akshaypanchal Jun 10, 2024
ad969fb
Update content/body/marquee.php
akshaypanchal Jun 10, 2024
f261e19
Update content/body/status.php
akshaypanchal Jun 10, 2024
2202040
Fix prettier precommit for images
Jun 10, 2024
b7744a4
Merge pull request #129 from PublicisSapient/add-image-to-heading
alisonhall Jun 10, 2024
d01c957
Merge branch 'main' into add-table-of-contents-to-pages
Jun 10, 2024
b65a8a1
Update content/body/text-resize.php
akshaypanchal Jun 10, 2024
b124b90
updating with main
Neha-Singla Jun 10, 2024
9bf2d4e
updating with main
Neha-Singla Jun 10, 2024
ff0c5d2
Merge branch 'main' of https://github.com/PublicisSapient/enable-a11y…
Neha-Singla Jun 10, 2024
f1ab975
Merge pull request #119 from PublicisSapient/89-vd-change-form-error-…
Neha-Singla Jun 10, 2024
ec435e2
ENABLE-8 Fix VoiceOver speaking character count twice.
ocjadan Jun 10, 2024
8a32dab
Merge main to bring branch up-to-date.
ocjadan Jun 10, 2024
7ad2c0a
update: refer tabbale selectors from the utility module
mahesh0618 Jun 11, 2024
cc4e4d7
Merge branch 'main' into fix-precommit-for-images
alisonhall Jun 11, 2024
490a831
Merge pull request #132 from PublicisSapient/fix-precommit-for-images
alisonhall Jun 11, 2024
ed21157
Instructions for reading out character count plays every time <textar…
ocjadan Jun 11, 2024
2219e0a
Merge branch 'main' into add-table-of-contents-to-pages
Jun 11, 2024
4eecbe0
fix[Issue# 49] - fix the suggsted code reviews
akshaypanchal Jun 11, 2024
789d369
Float up the region role to the <aside> element. Use the more appropr…
ocjadan Jun 11, 2024
2a48956
fix[Issue# 49] - fix the git pull branch merge issue
akshaypanchal Jun 11, 2024
6f1b4a1
Merge branch 'main' of ssh://ssh.github.com:443/PublicisSapient/enabl…
zoltan-dulac Jun 11, 2024
f3ac314
Adding mouseSelection.png
zoltan-dulac Jun 11, 2024
5e8a32b
I think I added the right dependency for robotjs ... let's see.
zoltan-dulac Jun 11, 2024
771a561
Attempt 2 to get robotjs running on CI/CD pipeline: Installing Xvfb
zoltan-dulac Jun 11, 2024
f2edc86
Attempt 3 for CI/CD fix: installing libpng++-dev
zoltan-dulac Jun 11, 2024
affd9bf
Separate useful utils into separate helpers file
Jun 11, 2024
0e1a443
Convert TOC style px to rem
Jun 11, 2024
6803d91
Add table of contents to list of modules
Jun 11, 2024
f40ed0b
Refactor TOC code to deduplicate selectors
Jun 11, 2024
b353205
Allow images to be included in the TOC heading links
Jun 11, 2024
573398a
Add options for skipping TOC headings
Jun 11, 2024
dfd30d5
Update styling of stat icons within TOC links
Jun 11, 2024
d34c8cf
Separate the added heading icons from the heading permalinks
Jun 11, 2024
7186308
Attempt #4
zoltan-dulac Jun 11, 2024
14581a8
Update handling of images within headings for TOC
Jun 11, 2024
715cea4
Attempt #4a
zoltan-dulac Jun 11, 2024
1beade9
Fix helper functions export syntax
Jun 11, 2024
52443e5
Ability to press certain keys to announce character count limit.
ocjadan Jun 11, 2024
6de39c1
Import the tooltip module again
Jun 11, 2024
67e4613
Merge latest changes from main.
ocjadan Jun 11, 2024
e585360
Fix spacing issues.
ocjadan Jun 11, 2024
c56cb5e
Handle missing nextElementSibling
Jun 11, 2024
6c5b51d
Create placeholder page files for table of contents
Jun 11, 2024
60ee532
Fix the toc link click event
Jun 11, 2024
175eaf7
commiting css change in .less file also
Neha-Singla Jun 12, 2024
6c28bd7
Merge branch 'main' into Issue#49-GrammerFix
akshaypanchal Jun 12, 2024
eeb1ba8
Merge pull request #137 from PublicisSapient/89-vd-change-form-error-…
Neha-Singla Jun 12, 2024
f2b627a
update: few more test cases
mahesh0618 Jun 12, 2024
5a4a18f
update: use pause method
mahesh0618 Jun 12, 2024
e18933a
fix[Issue# 49] - fix the grammar / spelling issues on all sections of…
akshaypanchal Jun 12, 2024
0124cb0
Merge branch 'main' into Issue#49-Grammar-ContentPage
akshaypanchal Jun 12, 2024
6c4243c
Merge branch 'main' into Issue#49-GrammerFix
akshaypanchal Jun 12, 2024
8e4924d
Attempt #5 -- ensuring the ESLINT npm ci is done after ensuring X11 l…
zoltan-dulac Jun 12, 2024
a57097b
Clean up some if logic.
ocjadan Jun 12, 2024
4ebcd9d
Merge branch 'main' of ssh://ssh.github.com:443/PublicisSapient/enabl…
zoltan-dulac Jun 12, 2024
6e9fbb0
Merge with main.
zoltan-dulac Jun 12, 2024
3eefd9a
Merge branch 'main' into feature/tests-tab
mahesh0618 Jun 13, 2024
9330eb8
Merge pull request #130 from PublicisSapient/feature/tests-tab
mahesh0618 Jun 13, 2024
1d929c7
Issue#49 - fix the content based on zolton's PR code suggestion
akshaypanchal Jun 13, 2024
3b92f1f
Merge branch 'main' into Issue#49-Grammar-ContentPage
akshaypanchal Jun 13, 2024
f383450
Merge branch 'main' into Issue#49-GrammerFix
akshaypanchal Jun 13, 2024
a146fba
Add additional helper functions
Jun 13, 2024
c62d445
Add the compiled es4 helper file
Jun 13, 2024
57abb48
Properly use aria-describedby.
ocjadan Jun 13, 2024
3ca8653
Merge latest main into branch.
ocjadan Jun 13, 2024
79c3434
Add the jscodeshift package
Jun 14, 2024
eb07d6b
Create a jscodeshift script to remove import and export statements
Jun 14, 2024
791de56
Update the shell script to run the jscodeshift script
Jun 14, 2024
ee444b3
Minor bracket changes after running the new ES6 to ES4 conversion
Jun 14, 2024
c07798d
Respect internationalization for aria description and instructions. R…
ocjadan Jun 14, 2024
c2a85b3
fix[Issue# 49] - fix the suggested PR review changes of content
akshaypanchal Jun 17, 2024
7af0f44
Use extracted helper functions in the global init
Jun 17, 2024
1a67703
Fix TOC childNode links
Jun 17, 2024
8768573
Update the auto-compiled code
Jun 17, 2024
8782525
fix[Issue#49] - fix the grammar / spelling issues on Controls Section…
akshaypanchal Jun 17, 2024
2e4a8d7
Remove the usage of globals and values from the first element with da…
ocjadan Jun 17, 2024
46dca43
Update the instructions for using the textarea character counter.
ocjadan Jun 17, 2024
0747509
Fix wording in Steps.
ocjadan Jun 17, 2024
a06628f
Fix wording one more time.
ocjadan Jun 17, 2024
35fd75a
fix[Issue#49] - fix the grammar / spelling issue in Form Elements sec…
akshaypanchal Jun 20, 2024
032ca6f
Ensure character counter is only added to textarea when data-has-char…
ocjadan Jun 20, 2024
e84bf8e
Edit instructions that claim the character counter uses a Javascript …
ocjadan Jun 20, 2024
2e86109
Step #2 instructions change: explicitly state data-has-character-coun…
ocjadan Jun 20, 2024
ed48887
Remove the note saying data-has-character-count doesn't need to be ex…
ocjadan Jun 20, 2024
896562b
Use an <a> element to link to the MDN docs for Step #3.
ocjadan Jun 20, 2024
6cec7c8
Shorten the instructions for Step #4.
ocjadan Jun 20, 2024
81ccb28
Code clean up.
ocjadan Jun 20, 2024
507df8d
fix[Issue#49] - fix the grammar / spelling check on form UX pattern s…
akshaypanchal Jun 20, 2024
378b76f
Update content/body/marquee.php
akshaypanchal Jun 21, 2024
e2bb7cd
Update content/body/status.php
akshaypanchal Jun 21, 2024
0cc14d2
Update content/body/text-resize.php
akshaypanchal Jun 21, 2024
ac1f940
Merge pull request #131 from PublicisSapient/Issue#49-GrammerFix
alisonhall Jun 21, 2024
c6bdec8
fix[Issue#49] - fix the suggested content changes by Alison on PR
akshaypanchal Jun 21, 2024
05cbbd8
Merge branch 'main' into Issue#49-ControlsSection
akshaypanchal Jun 21, 2024
57c1fe2
fix[Issue# 49] - fix the suggested code changes by Alison on PR
akshaypanchal Jun 21, 2024
50a114b
Merge branch 'main' into Issue#49-Grammar-ContentPage
akshaypanchal Jun 21, 2024
4b79cc8
Merge branch 'Issue#49-FormsSection' into Issue#49-GrammarIssue
akshaypanchal Jun 21, 2024
e0dea86
Merge branch 'Issue#49-Grammar-ContentPage' into Issue#49-GrammarIssue
akshaypanchal Jun 21, 2024
84d54ef
Add additional terms for components
Umasankar430 Jun 21, 2024
9c66fea
fix[Issue# 49] - fix the spelling issue of screen reader, third party…
akshaypanchal Jun 21, 2024
266dbc9
Add additional terms for components
Umasankar430 Jun 21, 2024
cbfded0
switch
Umasankar430 Jun 21, 2024
9d6be71
Merge branch 'main' into Add-term-Uma
Umasankar430 Jun 21, 2024
ad74ed0
fix[Issue# 49] - check for the grammar / spelling issues on FAQ, ACQ,…
akshaypanchal Jun 24, 2024
46c5d5f
Merge latest changes in main branch.
ocjadan Jun 24, 2024
8e77c63
Merge latest changes in main branch.
ocjadan Jun 24, 2024
d517f6c
Review comments
Umasankar430 Jun 25, 2024
83d683a
Review comments
Umasankar430 Jun 25, 2024
8399d86
Marquee
Umasankar430 Jun 25, 2024
3f24c69
Review comments
Umasankar430 Jun 25, 2024
8cfdcf0
Merge branch 'Add-term-Uma' of https://github.com/PublicisSapient/ena…
Umasankar430 Jun 25, 2024
e0c0740
ARIA live-region tests.
ocjadan Jun 25, 2024
a6ae07a
review comments
Umasankar430 Jun 25, 2024
cf0421b
Review comments
Umasankar430 Jun 25, 2024
9d20bb9
Review comments
Umasankar430 Jun 25, 2024
2a409f9
Character count span tests.
ocjadan Jun 25, 2024
9db8eb3
ARIA described-by tests.
ocjadan Jun 25, 2024
4ffc656
review comments
Umasankar430 Jun 25, 2024
8be604d
'use strict'
ocjadan Jun 25, 2024
f37e8ad
added review comments
Umasankar430 Jun 26, 2024
49b9367
Review comment
Umasankar430 Jun 26, 2024
6072613
Update ES4 jscodeshift script to reattach comments
Jun 26, 2024
6fa6daa
Add back in the comments to the ES4 modules
Jun 26, 2024
49b50ac
Improve the jscodeshift code to reattach comments
Jun 26, 2024
57aecee
Correct null-check for target.id
ocjadan Jun 26, 2024
931f3ab
Fix for input mask to take into account null value of input tag.
zoltan-dulac Jun 26, 2024
8d86c4b
Revert php file (it wasn't an html problem).
zoltan-dulac Jun 26, 2024
d573123
Update to follow better format for code.
zoltan-dulac Jun 26, 2024
ee91e4a
Simple character counter example.
ocjadan Jun 26, 2024
d24a6c9
Merge branch 'main' into fix-removal-of-imports-exports
alisonhall Jun 26, 2024
ee7a70a
OnKeyDown erase screen reader content, onKeyUp write screen reader co…
ocjadan Jun 26, 2024
12632e9
Merge pull request #142 from PublicisSapient/fix-removal-of-imports-e…
alisonhall Jun 26, 2024
7c18765
Fix accessibility issues detected during automated tests.
ocjadan Jun 26, 2024
75188e6
Add aria-label to live region to appease automated accessibility tests.
ocjadan Jun 26, 2024
e62c69d
Update content/body/carousel.php
akshaypanchal Jun 27, 2024
baae4d7
fix[Issue#49] - fix all suggested code changes of Alison on PR
akshaypanchal Jun 27, 2024
d49cdf8
Merge branch 'main' into Issue#49-GrammarIssue
akshaypanchal Jun 27, 2024
78650a8
Merge branch 'Issue#49-GrammarIssue' of github.com:PublicisSapient/en…
akshaypanchal Jun 27, 2024
1fb3c74
Merge branch 'main' into add-table-of-contents-to-pages
Jun 27, 2024
5b66414
Update manner for setting class names in TOC
Jun 27, 2024
ba2c909
Package lock changes.
zoltan-dulac Jun 28, 2024
20d33f2
Updated Chrome.
zoltan-dulac Jun 28, 2024
362f10f
Update typo.
zoltan-dulac Jun 28, 2024
cd5dd06
Merge branch 'main' into input-mask-null-value-fix
zoltan-dulac Jun 28, 2024
7d7f7ee
Merge pull request #154 from PublicisSapient/input-mask-null-value-fix
zoltan-dulac Jun 28, 2024
c9b688d
Merge branch 'main' into ENABLE-8-create-a-better-character-counter-w…
ocjadan Jun 28, 2024
3c8a224
Fix es4/enable-character-count.js error from missing bracket.
ocjadan Jun 28, 2024
9dd1a5b
Merge branch 'main' into Add-term-Uma
Umasankar430 Jul 2, 2024
f48e29d
Merge branch 'main' into Issue#49-GrammarIssue
akshaypanchal Jul 2, 2024
f568e54
Add expand/collapse subheadings within TOC
Jul 2, 2024
ec7b840
Style the TOC links
Jul 2, 2024
42fcd18
Update comments for the TOC, change toggle button tooltip to title, r…
Jul 2, 2024
1cacbb0
Merge branch 'main' into add-table-of-contents-to-pages
Jul 2, 2024
49e525e
Revert "Create placeholder page files for table of contents"
Jul 2, 2024
310c7f3
Move the import statements after the license info
Jul 2, 2024
64328a1
Make the IDs unique for the cloned TOC
Jul 2, 2024
026c847
fix[Issue#49] - fix the Zolton's content suggestion
akshaypanchal Jul 3, 2024
5b36b09
add aditional terms
Umasankar430 Jul 3, 2024
940daaf
Merge branch 'Add-term-Uma' of https://github.com/PublicisSapient/ena…
Umasankar430 Jul 3, 2024
56e0242
review comments
Umasankar430 Jul 3, 2024
bd06131
Refactor addMissingIDToHeading to better support duplicate headings
Jul 3, 2024
77ac65d
Add documentation to the helper functions
Jul 3, 2024
212ff2c
Add JSDoc style documentation to enable-toc module
Jul 3, 2024
8675a4b
One PR suggestion. Use exclamation to force Chrome to read out on eac…
ocjadan Jul 4, 2024
f6924f1
Use ARIA label to appease AXE violation.
ocjadan Jul 4, 2024
2cab17a
Ensure character count isn't re-read when entering textarea using mod…
ocjadan Jul 4, 2024
d45e70b
Ensure ARIA describedby cannot be selected by Mobile.
ocjadan Jul 4, 2024
05aeb72
Update content/body/input-mask.php
akshaypanchal Jul 5, 2024
1216e39
Update content/body/input-mask.php
akshaypanchal Jul 5, 2024
079c412
Update templates/includes/npm.php
akshaypanchal Jul 5, 2024
95fdc55
Update content/body/textbox.php
akshaypanchal Jul 5, 2024
f669f45
Update content/body/screen-reader-only-text.php
akshaypanchal Jul 5, 2024
744680c
Merge pull request #149 from PublicisSapient/Add-term-Uma
alisonhall Jul 5, 2024
1aca392
Merge branch 'main' into Issue#49-GrammarIssue
alisonhall Jul 5, 2024
0e13032
Emphasize the ARIA regions created for the textbox in order for scree…
ocjadan Jul 5, 2024
c05b35a
Fix HTML sublist error.
ocjadan Jul 5, 2024
7ae3b00
Merge pull request #150 from PublicisSapient/Issue#49-GrammarIssue
alisonhall Jul 5, 2024
6726914
Merge latest ENABLE-8 changes.
ocjadan Jul 8, 2024
3c6519e
Adjust tests to the updated element ids.
ocjadan Jul 8, 2024
b7dc0fc
Fix whitespaces.
ocjadan Jul 8, 2024
baae632
Fix whitespaces some more.
ocjadan Jul 8, 2024
5840417
Merge pull request #161 from PublicisSapient/ENABLE-145-unit-tests-fo…
ocjadan Jul 8, 2024
bcc7a1a
Merge branch 'main' into ENABLE-8-create-a-better-character-counter-w…
ocjadan Jul 8, 2024
81f4c0b
Merge branch 'main' into add-table-of-contents-to-pages
zoltan-dulac Jul 9, 2024
4e6ad83
feat: Added a new webpage for infographics
shiprarawal Jul 10, 2024
ffcfdc0
Merge pull request #159 from PublicisSapient/add-table-of-contents-to…
zoltan-dulac Jul 11, 2024
cae6e6f
Merge branch 'main' into infographics-img
zoltan-dulac Jul 11, 2024
33041fa
Merge pull request #155 from PublicisSapient/infographics-img
zoltan-dulac Jul 11, 2024
bb7b5b8
Merge branch 'main' into ENABLE-8-create-a-better-character-counter-w…
zoltan-dulac Jul 11, 2024
5f61282
Merge pull request #144 from PublicisSapient/ENABLE-8-create-a-better…
zoltan-dulac Jul 11, 2024
030e828
Merge branch 'main' of ssh://ssh.github.com:443/PublicisSapient/enabl…
zoltan-dulac Jul 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["@babel/preset-env"]
"presets": ["@babel/preset-env"]
}
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 4
max_line_length = 80
29 changes: 27 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,36 @@
"es2021": true,
"jest": true
},
"extends": "eslint:recommended",
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 12
},
"rules": {
}
"no-undef": "warn",
"no-unused-vars": "warn"
},
"ignorePatterns": [
"node_modules",
"enable-node-libs",
"js/enable-libs",
"js/modules",
"js/out",
"tmp",
"**.sh",
"**.less",
"**.php",
"js/tmp.js",
"js/demos/ana-tudor/**",
"bin/php-express/**"
],
"plugins": ["import", "node", "promise"],
"overrides": [
{
"files": ["*.test.js", "test-config.js"],
"rules": {
"no-undef": "warn"
}
}
]
}
75 changes: 75 additions & 0 deletions .github/workflows/push-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# GitHub Actions for CI/CD

name: Automated Tests on Git Push
on: push

jobs:
# An automated check that runs the ESLint scan
eslint:
name: Run ESLint scan
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11.0"
cache: "npm"
- name: Install X11 dependencies for robotjs (needed for unit testing on input-mask tests)
run: sudo apt-get install libxtst-dev libpng++-dev xvfb
- name: Install npm dependencies
run: npm ci
- name: Run ESLint
run: npm run eslint

# An automated check that runs all of the accessibility and unit tests
tests:
name: Run Automated tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.11.0"
cache: "npm"
- name: Set up JDK 11 for x64
uses: actions/setup-java@v4
with:
java-version: "11"
distribution: "temurin"
architecture: x64
- name: Install Lynx dependency
run: sudo apt install lynx
- name: Install PHP8.1
run: sudo apt install php8.1
- name: Install latest Chrome er.124 to match chromedriver package version
run: |
apt search '^google-chrome.*' \
&& wget -q -O /tmp/chrome.deb http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_126.0.6478.126-1_amd64.deb \
&& sudo apt install -y /tmp/chrome.deb --allow-downgrades \
&& rm /tmp/chrome.deb
- name: Log system details
run: |
uname &&
echo $OSTYPE &&
which google-chrome &&
google-chrome --version
- name: Install X11 dependencies for robotjs (needed for unit testing on input-mask tests)
run: sudo apt-get install libxtst-dev libpng++-dev xvfb
- name: Install npm dependencies
run: npm ci
- name: Start server and wait for localhost to be available
run: |
npm run start &
sleep 10 &&
curl http://localhost:8888
- name: Run automation tests
run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
npm run test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
.DS_Store
api-cache
tmp
.vscode

# auto-gen PHP files/logs
php_errors.log
8 changes: 8 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// This ensure that Husky is not installed and used in our CI/CD pipeline, but is otherwise automatically installed since it is only needed on commits. The following code was recommended by the Husky docs (https://typicode.github.io/husky/how-to.html).

// Skip Husky install in production and CI
if (process.env.NODE_ENV === "production" || process.env.CI === "true") {
process.exit(0);
}
const husky = (await import("husky")).default;
console.log(husky());
11 changes: 11 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env sh

. "$(dirname "$0")/_/husky.sh"

# This is the code that automatically runs the Prettier formatter on all staged parts of files that are to be committed. It is run after a commit has been triggered, but before the commit is actually made. This ensures that all code that is committed is formatted correctly.

# Source: https://prettier.io/docs/en/precommit.html#option-4-git-format-stagedhttpsgithubcomhallettjgit-format-staged

npx git-format-staged -f 'prettier --ignore-unknown --stdin-filepath "{}"' '*.js' '*.jsx' '*.less' '*.md' '*.json' '*.html' '*.php' '*.sh'

# If you have issues when running the npx command in an IDE, you should try running the command in the terminal instead. This issue is due to the PATH values not being set as expected in the IDE in order for npx to be recognized. See https://stackoverflow.com/questions/67115897/vscode-github-desktop-pre-commit-hook-npx-command-not-found for more information.
23 changes: 23 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Ignore artifacts:
node_modules
css
data
diagram-gimp-files
enable-node-libs
fonts
images
js/enable-libs
js/modules
js/out
tmp
videos
vtt
bin/php-express
**.ico
**/*.jpeg
**/*.jpg
**/*.png
**/*.webp
**/*.mp4
**/*.gif
**/*.xcf
22 changes: 22 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"phpVersion": "8.1",
"plugins": ["@prettier/plugin-php"],
"tabWidth": 4,
"bracketSameLine": true,
"printWidth": 80,
"singleQuote": false,
"overrides": [
{
"files": ["*.js"],
"options": {
"singleQuote": true
}
},
{
"files": ["*.md", "package.json", "package-lock.json"],
"options": {
"tabWidth": 2
}
}
]
}
105 changes: 80 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A place to learn and share with developers what makes web work accessible. This

### Prerequisite Installations

- nvm: A Node version manager. It allows you to install several versions of node on the same machine and change versions easily.
- nvm: A Node version manager. It allows you to install several versions of node on the same machine and change versions easily.
- [Here are instructions in how to install nvm](https://github.com/nvm-sh/nvm#usage)
- After installing nvm, install a Node version >= 18 using nvm, ideally `nvm install 20.11.0`
- npm: a Node Package Manager, usually installed alongside Node
Expand All @@ -18,14 +18,47 @@ A place to learn and share with developers what makes web work accessible. This
- [Download from browser](https://etc.usf.edu/techease/4all/web-accessibility/the-lynx-text-web-browser/)
- Install using homebrew: `brew install lynx`
- Install using MacPorts: `sudo port install lynx`
- Install on Ubuntu: `sudo apt install lynx`
- PHP (version > 8.1)
- Install options:
- [Install from browser](https://www.php.net/downloads.php)
- Install using homebrew: `brew install php`
- Install using MacPorts: `sudo port install php`
- Install on Ubuntu: `sudo apt install php8.1`
- You can find the path to the installed PHP using `which php`. Add that path to your terminal profile's PATH environment value and/or VS Code settings.
- Java: required in order to use the v.Nu checker during automation and unit testing

- Install options:

- Brew Install Options:

- ```bash
brew install java
```
- ```bash
brew install openjdk
```
- Additional tasks

- ```bash
java -version
```

If you get "Unable to locate a Java Runtime", proceed to next step.

- Ensure your symlink is correctly mapped (these instructions will also appear after you brew install java)

- ```bash
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk \
/Library/Java/JavaVirtualMachines/openjdk.jdk
```

- Manual Install Options:
- Mac Install <https://www.java.com/en/download/help/mac_install.html>
- Windows Install <https://www.java.com/en/download/help/windows_manual_download.html>

> Note: Any changes to these prerequisites will need to be reflected in the GitHub Actions in order to run the CI/CD checks.

#### Optional installations (since `npm run server` will run an express server)

- MAMP (OSX) or Apache: <https://www.mamp.info/en/mac/>
Expand All @@ -35,26 +68,28 @@ A place to learn and share with developers what makes web work accessible. This

1. Run the following commands in your Terminal or Terminal equivalent program:

```sh
git clone git@github.com:PublicisSapient/enable-a11y.git
cd enable-a11y
npm clean-install
```
```sh
git clone git@github.com:PublicisSapient/enable-a11y.git
cd enable-a11y
npm clean-install
```

> Note: Using `clean-install` instead of just `install` installs the exact package versions listed in the package-lock.json, and therefore has guaranteed compatibility.
> Note: Using `clean-install` instead of just `install` installs the exact package versions listed in the package-lock.json, and therefore has guaranteed compatibility.

2. Start the local server using:

```sh
npm run start
```
```sh
npm run start
```

3. Open <http://localhost:8888> in your browser to see the local version of the site.

4. Make sure everything is installed correctly by running the automated tests using `npm run test`.

> See the [Chromedriver issues](#chromedriver-issues) section if you encounter an error related to Chromedriver.

> Make sure your local server is running in another terminal before running `npm run test`.

## Tests

### Tools used for testing
Expand All @@ -75,7 +110,7 @@ Read [the Enable Code Quality article](https://www.useragentman.com/enable/code-
- Run only the Axe tests: `npm run test-axe`
- Run only the Pa11y tests: `npm run test-pa11y`

If you are noticing that the jest tests are taking a long time, you might want to run `npm run jest-debug-memory-leak`. If the heap size for each test group increases a lot, there is a memory leak in the tests. More information about that can be found at in the article [Your Jest Tests are Leaking Memory](https://chanind.github.io/javascript/2019/10/12/jest-tests-memory-leak.html) by [David Chanin](https://chanind.github.io/about/)
If you are noticing that the jest tests are taking a long time, you might want to run `npm run jest-debug-memory-leak`. If the heap size for each test group increases a lot, there is a memory leak in the tests. More information about that can be found at in the article [Your Jest Tests are Leaking Memory](https://chanind.github.io/javascript/2019/10/12/jest-tests-memory-leak.html) by [David Chanin](https://chanind.github.io/about/)

> Hint: Make sure the local server is running first using the `npm run start` command.

Expand All @@ -99,23 +134,29 @@ npm install -D chromedriver --chromedriver_filepath=/path/to/chromedriver_mac64.

If you still have problems with Chromedriver, you may want to read the Stack Overflow article [Session Not Created: This version of ChromeDriver only supports Chrome version 98](https://stackoverflow.com/questions/71859550/session-not-created-this-version-of-chromedriver-only-supports-chrome-version-9).

## Style Notes
## Development

1. All font-sizes are converted to rems. This is done via LESS. If you want a font-size of 20px, then you would do the following:
### Contributing code

```css
div {
font-size: (20/@px);
}
```
If you would like to contribute to this project, please feel free to raise a Pull Request! See the documentation at [Creating a pull request from a fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) for instructions.

The `@px` variable is set to 16rem, which is also the base font size
### Style Notes

2. If we hide custom components and use CSS to create custom facades for them, we must ensure that these facades will be discoverable to users navigating by touch. For more information about being inclusive of users navigating by touch, please read [Inclusively Hiding & Styling Checkboxes and Radio Buttons](https://www.sarasoueidan.com/blog/inclusively-hiding-and-styling-checkboxes-and-radio-buttons/) by [Sara Soueidan](https://www.sarasoueidan.com).
1. All font-sizes are converted to rems. This is done via LESS. If you want a font-size of 20px, then you would do the following:

## Adding An External NPM Module To The Front-End Code
```css
div {
font-size: (20 / @px);
}
```

If you are adding examples to this repository and need support of an external NPM module for the front-end (like a JS library), then you should add the library to the `nodeFiles` array in the file `promote-node-modules-to-server.js`.
The `@px` variable is set to 16rem, which is also the base font size

2. If we hide custom components and use CSS to create custom facades for them, we must ensure that these facades will be discoverable to users navigating by touch. For more information about being inclusive of users navigating by touch, please read [Inclusively Hiding & Styling Checkboxes and Radio Buttons](https://www.sarasoueidan.com/blog/inclusively-hiding-and-styling-checkboxes-and-radio-buttons/) by [Sara Soueidan](https://www.sarasoueidan.com).

### Adding An External NPM Module To The Front-End Code

If you are adding examples to this repository and need support of an external NPM module for the front-end (like a JavaScript library), then you should add the library to the `nodeFiles` array in the file `promote-node-modules-to-server.js`.

For example, when I added the `glider-js` library to Enable so I can use it in the Carousel demos, I added the files I needed for the front-end to `nodeFiles` with these two lines:

Expand All @@ -133,11 +174,25 @@ const nodeFiles = [
]
</pre>

When you start the project with `npm run server`, the files in the `nodeFiles` array will be placed in the `enable-node-libs` directory in the project root. Use this directory to load the files in your scripts, css, or HTML files.
When you start the project with `npm run server`, the files in the `nodeFiles` array will be placed in the `enable-node-libs` directory in the project root. Use this directory to load the files in your scripts, css, or HTML files.

### Pre-commit hook error - "npx: command not found"

If you encounter an error when trying to commit some code from within an IDE (like VS Code, IntelliJ, GitHub Desktop, etc.), and the error is about the `npx` command not being found, you should try running the command in the terminal instead. This issue is due to the PATH values not being set as expected in the IDE in order for npx to be recognized. See <https://stackoverflow.com/questions/67115897/vscode-github-desktop-pre-commit-hook-npx-command-not-found> for more information.

### Pull Request from fork not completing CI/CD tests

If you are trying to contribute to the Enable site from a forked version of this repository, and the automatic tests in your Pull Request only ever show "Some checks haven't completed yet" and "Expected - Waiting for status to be reported" (see an example in the image below), then you may need to update the settings in your forked repository. The "Allow all actions and reusable workflows" option within the Actions section of the settings should be selected. Please go to the [Using GitHub Actions to Run the Tests in the CI/CD Pipeline](https://www.useragentman.com/enable/code-quality.php#using-github-actions-to-run-the-tests-in-the-ci-cd-pipeline--heading) section on this site for more details on how to find this option. After changing the setting, you will need to retrigger the actions by making another commit.

![View of a GitHub PR with the "Some checks haven't completed yet" message](images/automated-tests-pending.png)

### I Made a New Component! How do I make sure it is available on NPM

You will need to update the version number that NPM broadcasts as the latest version number. Please use [np](https://github.com/sindresorhus/np) to do this (it is what we have used in the past). This should be done by development lead of the Enable project (as of this writing, this is [Zoltan Hawryluk](https://www.npmjs.com/~zoltandulac)).

## References

When testing using screen readers, these resources may be of help to you:

* [Desktop Screen Readers Survival Guide - Basic Keyboard Shortcuts](https://dequeuniversity.com/screenreaders/survival-guide)
* [NVDA Users Guide](https://www.nvaccess.org/files/nvda/documentation/userGuide.html)
- [Desktop Screen Readers Survival Guide - Basic Keyboard Shortcuts](https://dequeuniversity.com/screenreaders/survival-guide)
- [NVDA Users Guide](https://www.nvaccess.org/files/nvda/documentation/userGuide.html)
6 changes: 3 additions & 3 deletions _01-alert-dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"HTML Tidy for HTML5 for Apple macOS version 5.6.0">

<title>Alert Dialog Example</title>
<?php include("includes/common-head-tags.php"); ?>
<?php include "includes/common-head-tags.php"; ?>
<link media="all" rel="stylesheet" href="css/dialog.css">
</head>
<body>
<div id="a11y-modal__non-modal-content">
<?php include("includes/documentation-header.php"); ?>
<?php include "includes/documentation-header.php"; ?>
<main id="main" tabindex="-1">
<?php include "includes/pause-anim-control.php" ?>
<?php include "includes/pause-anim-control.php"; ?>
<!-- <aside class="notes">
<h2>Notes:</h2>
<ul>
Expand Down
Loading