Issue/1745#1903
Open
MaryamMehd wants to merge 17 commits intomainfrom
Open
Conversation
- Created AccessibilityErrors.stories.tsx with 3 test stories - Tests verify role='alert' and aria-live='assertive' attributes - Covers String (regex), Integer (minValue), and Text (maxLength) validations - All tests manually verified with VoiceOver on macOS - Errors are announced dynamically without focus change Related to #1745
Apply role='alert' and aria-live='assertive' via slotProps.formHelperText instead of wrapping in AccessibleFeedback component. This ensures the ARIA attributes are on the MUI FormHelperText element that tests query for, fixing the failing AccessibilityErrors Storybook tests.
Change test assertion from 'does not match' to 'should match' to align with the actual regex validation error message: 'Input should match the specified regex'.
… components
- Replace slotProps.formHelperText with helperText={<AccessibleFeedback>{feedback}</AccessibleFeedback>}
- Apply to StringField, IntegerField, and TextField to fix Storybook test failures
- MUI's FormHelperText doesn't forward custom role/aria-live props, so we use the wrapper component
- VoiceOver confirmed to announce error messages properly
Fixes #1745 Storybook test failures
…s tests - Replace conditional if(alertElement) with expect(alertElement).not.toBeNull() - Prevents silent test passes and timeout errors - Ensures tests fail properly if error element is not found This fixes the timeout errors in AccessibilityErrors.stories.tsx Storybook tests.
- Wrap error messages with AccessibleFeedback component using role='alert' and aria-live='assertive' - Apply to StringField, IntegerField, and TextField components - Add StyledRequiredTypography export alias for backward compatibility - Update AccessibilityErrors tests to verify ARIA attributes - Remove unused state variables in OpenChoiceAutocompleteField - Ensure error messages are announced by screen readers per WCAG 2.1 SC 4.1.3
- Replace getByTestId() with querySelector for data-test attribute in Decimal, Integer, and Quantity tests - Add findByLinkIdOrLabel import to Quantity.stories.tsx - Add null checks for Clear button in Decimal and Integer basic tests to prevent test failures - All 188 Storybook tests now passing
- Remove unused AccessibleFeedback imports from Choice and OpenChoice components - Remove unused 'within' import from Decimal, Integer, and Quantity test files
Merge latest main into issue/1745 and resolve conflicts in choice value-set selection fields, preserving placeholder behavior and delayed dropdown opening for accessibility. Made-with: Cursor
…bute The checkRadioOption call was passing 'Other, please specify:' (with a trailing colon) but ChoiceRadioSingle sets data-test using the raw label prop which has no colon - the colon is only added visually via styledLabel. Removing the colon aligns the test selector with the actual attribute value. Made-with: Cursor
RadioButtonWithOpenLabel passes label + ':' to ChoiceRadioSingle, so the data-test attribute is 'radio-single-Other, please specify:'. The colon in the test selector is required to match. Made-with: Cursor
Accept main's conditional aria-label/aria-describedby pattern in DecimalField and QuantityField, and main's corrected clear button selector (title="Clear") in Integer.stories. Made-with: Cursor
Remove unused 'Await' import from react-router-dom in aboriginalFormCompletedFor49To25Years and aboriginalFormCompletedFor51Years. These files were brought in via merge from main. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds AccessibleFeedback wrapper around error/feedback messages so screen readers announce them as WCAG 2.1 SC 4.1.3 status messages.
Also fixes a CI Storybook test selector that had an incorrect colon removal — reverted to match the component's actual data-test attribute.
Closes #1745