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

Feedback: polish AJAX fragment and adding PII scrub #2462

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

Conversation

Garneauma
Copy link
Contributor

@Garneauma Garneauma commented Jan 10, 2025

This pull request does the following:

1 - Polish AJAX fragments (from @EricDunsworth)

The AJAX fragments had two minor flaws:

  • The English fragment contained pageData references that were missing from the French variant. That difference caused a hidden input named "contact" (with a JSON string as its value) to be injected into French feedback widgets. Although it didn't cause any other issues (data-feedback-link and data-feedback-url still worked fine in practice).
  • The no button's invisible transition message in JS mode is technically a status message, but wasn't coded as such (was using aria-live="polite" as opposed to role="status").

This resolves the flaws by:

  • Adding pageData references throughout the French fragment (same spots as English) to eliminate the hidden "contact" input.
  • Replacing aria-live="polite" with role="status" in the no button's transition message:
    • role="status" is a more formal way of denoting status messages, implicitly sets aria-live="polite" + aria-atomic="true" and is already in use for the widget's thank you message.

2 - Adds PII Scrub to the PFT

The Page feedback tool now has personal information screening added to the comment field on submit.

Supersedes #2401

Changes related to WET-509

The AJAX fragments had two minor flaws:
* The English fragment contained pageData references that were missing from the French variant. That difference caused a hidden input named "contact" (with a JSON string as its value) to be injected into French feedback widgets. Although it didn't cause any other issues (data-feedback-link and data-feedback-url still worked fine in practice).
* The no button's invisible transition message in JS mode is technically a status message, but wasn't coded as such (was using aria-live="polite" as opposed to role="status").

This resolves the flaws by:
* Adding pageData references throughout the French fragment (same spots as English) to eliminate the hidden "contact" input.
* Replacing aria-live="polite" with role="status" in the no button's transition message:
  * role="status" is a more formal way of denoting status messages, implicitly sets aria-live="polite" + aria-atomic="true" and is already in use for the widget's thank you message.
@Garneauma Garneauma changed the title Pft pii Feedback: polish AJAX fragment and adding PII scrub Jan 10, 2025
@Garneauma
Copy link
Contributor Author

Pre-approved upon successful review.

Copy link
Member

@duboisp duboisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Wait for a confirmation of completeness by the dev coordinator.
  • Wait for DTO approval prior to merge it

Note: Review and I tested against the wet-boew v4.0.84

Small change required, see inline comments

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move in demoted folder.

Suggestion: Rename the file name to indicate this is a content fragment. Like "ajax-pft-v1" or something similar.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move in demoted folder.

@@ -1028,6 +1050,56 @@
}
]
},
{
"@id": "_:iteration_pft_1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a link to the demote ajax code example/sample?

Copy link
Member

@duboisp duboisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional todo:

  • Fix the confusion with the files in the "ajax" folder vs "asset" folder. Its seem there is some duplication.
  • In the instruction, please mention that the implementer must upgrade their GCWeb installation to at least GCWeb v16.1.0 in order to use it.

@Garneauma
Copy link
Contributor Author

Garneauma commented Jan 15, 2025

@duboisp The "ajax" folder is for the "Report a problem" variation. The "assets" folder is for the "Page feedback tool" variation. There is no duplication. It was decided upon the introduction of the PFT that we would have the ajaxed-in file be in the "assets" folder since we have to copy that file to the AEM environment.

@duboisp duboisp assigned Garneauma and unassigned duboisp Jan 15, 2025
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.

3 participants