Skip to content

Conversation

dmaurya929
Copy link
Contributor

@dmaurya929 dmaurya929 commented Aug 31, 2025

Key Changes

  • AccessibilityCodeChangeHandler: Processes code change updates from Mystique S3 reports
  • Form-specific suggestion creation: Individual suggestions for each HTML element with issues
  • Mystique integration: Direct processing of Mystique-detected accessibility issues
  • Form-specific rules: Support for label, input-button-name, autocomplete-valid, etc

Copy link

github-actions bot commented Aug 31, 2025

This PR will trigger a minor release when merged.

- Introduced a new handler to update accessibility suggestions based on code changes from S3.
- Added functionality to read code change reports and update suggestions accordingly.
- Included comprehensive tests to ensure correct behavior of the new handler.
// Update suggestion data with diff content and availability flag
const updatedData = {
...suggestionData,
diffContent: reportData.diff,
Copy link

Choose a reason for hiding this comment

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

where is suggestion stored ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Diff content is stored in suggestion object.
Currently, there is duplication as if there are 5 HTML elements with issue for color-contrast then it store diff content on each suggestion.

Copy link

Choose a reason for hiding this comment

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

My point was since it is being saved in Dynamo we can have a problem with the size of the diff. Let's keep a watch on the same going forward

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, for large diff content, there can be issue. For now followed the simplest approach, but yes i'll have watch

a11yData
.filter((formData) => formData.a11yIssues?.length > 0)
.forEach((formData) => {
const { form: pageUrl, formSource: source, a11yIssues } = formData;
Copy link

Choose a reason for hiding this comment

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

lets' update mystique to start returning source. @amit-mnnit

src/index.js Outdated
'guidance:forms-a11y': formAccessibilityGuidance,
'detect:forms-a11y': mystiqueDetectedFormAccessibilityOpportunity,
'guidance:accessibility-remediation': accessibilityRemediationGuidance,
'accessibility-code-change': accessibilityCodeChangeHandler,
Copy link

Choose a reason for hiding this comment

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

codefix:accessibility

const urlObject = {
type: 'url',
url: pageUrl,
...(source && { source }),
Copy link

Choose a reason for hiding this comment

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

will there be a case where the source is empty ?

Copy link
Contributor Author

@dmaurya929 dmaurya929 Sep 17, 2025

Choose a reason for hiding this comment

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

Atleast for now No. if formSource not provided to M by default it will return issues of first form element without source.

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.

2 participants